Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProviderPusher is the Pusher provider. ProviderPusher = "pusher" // ProviderAbly is the Ably provider. ProviderAbly = "ably" // ProviderWebSocket is the WebSocket provider. ProviderWebSocket = "websocket" // ProviderSSE is the SSE provider. ProviderSSE = "sse" // ProviderNoop is the no-op provider. ProviderNoop = "noop" )
Variables ¶
This section is empty.
Functions ¶
func ProvideAsyncNotifierFromConfig ¶
func ProvideAsyncNotifierFromConfig(cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider) (asyncnotifications.AsyncNotifier, error)
ProvideAsyncNotifierFromConfig provides an AsyncNotifier from a config.
func RegisterAsyncNotifier ¶
RegisterAsyncNotifier registers an asyncnotifications.AsyncNotifier with the injector.
Types ¶
type Config ¶
type Config struct {
Pusher *pusher.Config `env:"init" envPrefix:"PUSHER_" json:"pusher,omitempty"`
Ably *ably.Config `env:"init" envPrefix:"ABLY_" json:"ably,omitempty"`
WebSocket *asyncws.Config `env:"init" envPrefix:"WEBSOCKET_" json:"websocket,omitempty"`
SSE *asyncsse.Config `env:"init" envPrefix:"SSE_" json:"sse,omitempty"`
Provider string `env:"PROVIDER" json:"provider"`
}
Config is the configuration for the async notifications provider.
func (*Config) ProvideAsyncNotifier ¶
func (cfg *Config) ProvideAsyncNotifier(logger logging.Logger, tracerProvider tracing.TracerProvider) (asyncnotifications.AsyncNotifier, error)
ProvideAsyncNotifier provides an AsyncNotifier based on configuration.
Click to show internal directories.
Click to hide internal directories.