Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrServerShuttingDown = errors.New("subscription server shutting down")
ErrServerShuttingDown is an error returned in case the server is in the process of shutting down.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Cancel should be called in case the client no longer wants to // subscribe for updates from the server. Cancel func() // contains filtered or unexported fields }
Client is used to get notified about updates the caller has subscribed to,
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a struct that manages a set of subscriptions and their corresponding clients. Any update will be delivered to all active clients.
func (*Server) SendUpdate ¶
SendUpdate is called to send the passed update to all currently active subscription clients.
Click to show internal directories.
Click to hide internal directories.