Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeService ¶
type NodeService interface {
Subscribe(ctx context.Context) (_ <-chan model.NodeChangedEvent, err error)
}
func NewNodeService ¶
func NewNodeService(subscription Subscription) NodeService
type Service ¶
type Service[T model.NodeChangedEvent] interface { Notify(event T) error Subscribe(ctx context.Context) (<-chan T, error) HasSubscribers() bool }
func NewPeerService ¶
func NewPeerService(subscription Subscription) Service[*model.PeerChangedEvent]
func NewServerService ¶
func NewServerService(subscription Subscription) Service[*model.ServerChangedEvent]
func NewUserService ¶
func NewUserService(subscription Subscription) Service[*model.UserChangedEvent]
type Subscription ¶
type Subscription interface { Notify(bytes []byte, channel string) error Subscribe(ctx context.Context, channel string) (<-chan []byte, error) HasSubscribers(channel string) bool }
func NewInMemorySubscription ¶
func NewInMemorySubscription() Subscription
Click to show internal directories.
Click to hide internal directories.