Documentation ¶
Overview ¶
Package mux provides the way to listen for updates from the cloud
Index ¶
- type Mux
- type WatchOption
- func WithOnBootstrapConfigUpdated(onBootstrapConfigUpdated func(context.Context)) WatchOption
- func WithOnBundleUpdated(onBundleUpdated func(ctx context.Context, key string)) WatchOption
- func WithOnConnected(onConnected func(context.Context)) WatchOption
- func WithOnDisconnected(onDisconnected func(context.Context)) WatchOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func New ¶
func New(client connect.ConnectClient) *Mux
Start starts the updates service, listening for updates from the cloud until the context is canceled
type WatchOption ¶
type WatchOption func(*config)
func WithOnBootstrapConfigUpdated ¶
func WithOnBootstrapConfigUpdated(onBootstrapConfigUpdated func(context.Context)) WatchOption
WithOnBootstrapConfigUpdated sets the callback for when the bootstrap config is updated
func WithOnBundleUpdated ¶
func WithOnBundleUpdated(onBundleUpdated func(ctx context.Context, key string)) WatchOption
WithOnBundleUpdated sets the callback for when the bundle is updated
func WithOnConnected ¶
func WithOnConnected(onConnected func(context.Context)) WatchOption
WithOnConnected sets the callback for when the connection is established
func WithOnDisconnected ¶
func WithOnDisconnected(onDisconnected func(context.Context)) WatchOption
WithOnDisconnected sets the callback for when the connection is lost
Click to show internal directories.
Click to hide internal directories.