Documentation
¶
Index ¶
Constants ¶
View Source
const ( MetricActiveConnections = "active_connections" MetricEventsSent = "events_sent_total" MetricConnectionErrors = "connection_errors_total" MetricEventLatency = "event_delivery_latency_seconds" MetricKeepalivesSent = "keepalives_sent_total" LabelEventType = "event_type" LabelErrorType = "error_type" ErrorTypeBufferFull = "buffer_full" ErrorTypeNoConnection = "no_connection" ErrorTypeWriteFailure = "write_failure" ErrorTypeMarshalError = "marshal_error" )
Metric constants
Variables ¶
View Source
var Module = fx.Module( "sse", fx.Decorate(func(log *zap.Logger) *zap.Logger { return log.Named("sse") }), fx.Provide( newMetrics, fx.Private, ), fx.Provide( NewService, ), fx.Invoke(func(lc fx.Lifecycle, svc *Service) { lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { return svc.Close(ctx) }, }) }), )
Functions ¶
func WithKeepAlivePeriod ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) KeepAlivePeriod ¶
type Event ¶
type Event struct {
Type smsgateway.PushEventType `json:"event"`
Data map[string]string `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.