Documentation ¶
Index ¶
- type Broker
- type Client
- type ConfigUpdate
- type NotifyService
- func (n *NotifyService) NotifyConfigUpdate(ctx context.Context, repo, env, version string)
- func (n *NotifyService) NotifyGlobally(ctx context.Context, cu *ConfigUpdate) error
- func (n *NotifyService) NotifyLocally(cu *ConfigUpdate)
- func (n *NotifyService) RunGlobal(ctx context.Context)
- func (n *NotifyService) RunLocal(ctx context.Context)
- func (n *NotifyService) ShutdownGlobal()
- func (n *NotifyService) ShutdownLocal(ctx context.Context)
- func (n *NotifyService) Subscribe(ctx context.Context, env string) *Client
- func (n *NotifyService) Unsubscribe(ctx context.Context, client *Client)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker manages clients and messages.
func (*Broker) Broadcast ¶
func (b *Broker) Broadcast(data *ConfigUpdate)
type Client ¶
type Client struct { Send chan *ConfigUpdate // contains filtered or unexported fields }
Client represents a subscriber with a channel to send messages.
type ConfigUpdate ¶
type NotifyService ¶
type NotifyService struct {
// contains filtered or unexported fields
}
func (*NotifyService) NotifyConfigUpdate ¶
func (n *NotifyService) NotifyConfigUpdate(ctx context.Context, repo, env, version string)
NotifyConfigUpdate notifies all nodes and local subscribers about a configuration update.
func (*NotifyService) NotifyGlobally ¶
func (n *NotifyService) NotifyGlobally(ctx context.Context, cu *ConfigUpdate) error
func (*NotifyService) NotifyLocally ¶
func (n *NotifyService) NotifyLocally(cu *ConfigUpdate)
func (*NotifyService) RunGlobal ¶
func (n *NotifyService) RunGlobal(ctx context.Context)
RunGlobal starts the global notification service
func (*NotifyService) RunLocal ¶
func (n *NotifyService) RunLocal(ctx context.Context)
RunLocal starts the local notification service, particularly the broker's run loop.
func (*NotifyService) ShutdownGlobal ¶
func (n *NotifyService) ShutdownGlobal()
func (*NotifyService) ShutdownLocal ¶
func (n *NotifyService) ShutdownLocal(ctx context.Context)
func (*NotifyService) Subscribe ¶
func (n *NotifyService) Subscribe(ctx context.Context, env string) *Client
func (*NotifyService) Unsubscribe ¶
func (n *NotifyService) Unsubscribe(ctx context.Context, client *Client)
Click to show internal directories.
Click to hide internal directories.