A set of stabilized interfaces for cchat implementations, joining the backend and frontend together.
diamondburned
8bfabf58ec
This commit separated SetterMethods that are specifically for updating containers to another method type, named ContainerUpdaterMethod. This change is done to force a context parameter into container setters, allowing the frontend to know if an incoming update is valid or not, based on the state of the context given. The validity check should be the same as any other context: select { case <-ctx.Done(): return default: addEvent() } It is crucial, however, to do the checking and updating in the same thread or lock as the context is cancelled. This explicit synchronization is required to prevent any race condition whatsoever with cancellation of the context. The backend must pass in the right context, that is, any context that inherits the cancellation from the frontend. Passing in the invalid context is undefined behavior and will eventually cause a data race. |
||
---|---|---|
cmd/internal | ||
repository | ||
services | ||
text | ||
utils | ||
.editorconfig | ||
LICENSE | ||
README.md | ||
cchat.go | ||
generator.go | ||
go.mod | ||
go.sum |
README.md
cchat
A set of stabilized interfaces for cchat implementations, joining the backend and frontend together.
Refer to the GoDoc for interfaces and documentations.
Known implementations
The following sections contain known cchat implementations. PRs are welcomed for more implementations to be added here.
Backend
- diamondburned/cchat-mock
- A small subset of the cchat backend implementation mocked with fake data for testing.
- diamondburned/cchat-discord
- A Discord backend implementing cchat interfaces.
Frontend
- diamondburned/cchat-gtk
- A GTK+3 implementation of a cchat frontend.