Documentation ¶
Overview ¶
Package backend defines the types that UI components can use to get updates on chat state.
There are a few different planned implementations: "demo", which generates exemplary events / state internally; "local", which starts IRC clients within the process; and "daemon", which connects to another process that terminates the IRC connections, performs logging, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { DataPublisher EventsArchive Sender }
type DataPublisher ¶
type DataPublisher interface { Subscribe(StateReceiver) SubscribeFiltered(FilteredStateReceiver) }
A DataPublisher allows components to subscribe to updates. Only one subscriber of any sort may be active at a time, from a single DataPublisher.
type EventsArchive ¶
type EventsArchive interface {
EventsBefore(network, channel string, n int, last data.EventID) []data.Event
}
EventsArchive allows lookup of previous event entries.
type FilteredStateReceiver ¶
type FilteredStateReceiver interface { StateReceiver Filter() (network, channel string) }
FilteredStateReceiver only receives updates for a particular channel and its network.
type StateReceiver ¶
type StateReceiver interface { UpdateNetwork(data.NetworkState) UpdateChannel(data.ChannelState) }
StateReceiver receives updates about one or more networks and channels.