Documentation ¶
Index ¶
- Variables
- type Config
- type StanOutput
- func (s *StanOutput) Close() error
- func (s *StanOutput) Init(ctx context.Context, name string, cfg map[string]interface{}, ...) error
- func (s *StanOutput) RegisterMetrics(reg *prometheus.Registry)
- func (s *StanOutput) SetClusterName(name string)
- func (s *StanOutput) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, ...) error
- func (s *StanOutput) SetLogger(logger *log.Logger)
- func (s *StanOutput) SetName(name string)
- func (s *StanOutput) SetTargetsConfig(map[string]*types.TargetConfig)
- func (s *StanOutput) String() string
- func (s *StanOutput) Write(ctx context.Context, rsp protoreflect.ProtoMessage, meta outputs.Meta)
- func (s *StanOutput) WriteEvent(ctx context.Context, ev *formatters.EventMsg)
Constants ¶
This section is empty.
Variables ¶
View Source
var StanNumberOfFailSendMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "stan_output", Name: "number_of_stan_msgs_sent_fail_total", Help: "Number of failed msgs sent by gnmic stan output", }, []string{"publisher_id", "reason"})
View Source
var StanNumberOfSentBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "stan_output", Name: "number_of_written_stan_bytes_total", Help: "Number of bytes written by gnmic stan output", }, []string{"publisher_id", "subject"})
View Source
var StanNumberOfSentMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "stan_output", Name: "number_of_stan_msgs_sent_success_total", Help: "Number of msgs successfully sent by gnmic stan output", }, []string{"publisher_id", "subject"})
View Source
var StanSendDuration = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "gnmic", Subsystem: "stan_output", Name: "msg_send_duration_ns", Help: "gnmic stan output send duration in ns", }, []string{"publisher_id"})
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `mapstructure:"name,omitempty"` Address string `mapstructure:"address,omitempty"` SubjectPrefix string `mapstructure:"subject-prefix,omitempty"` Subject string `mapstructure:"subject,omitempty"` Username string `mapstructure:"username,omitempty"` Password string `mapstructure:"password,omitempty"` ClusterName string `mapstructure:"cluster-name,omitempty"` PingInterval int `mapstructure:"ping-interval,omitempty"` PingRetry int `mapstructure:"ping-retry,omitempty"` Format string `mapstructure:"format,omitempty"` AddTarget string `mapstructure:"add-target,omitempty"` TargetTemplate string `mapstructure:"target-template,omitempty"` OverrideTimestamps bool `mapstructure:"override-timestamps,omitempty"` RecoveryWaitTime time.Duration `mapstructure:"recovery-wait-time,omitempty"` NumWorkers int `mapstructure:"num-workers,omitempty"` Debug bool `mapstructure:"debug,omitempty"` WriteTimeout time.Duration `mapstructure:"write-timeout,omitempty"` EnableMetrics bool `mapstructure:"enable-metrics,omitempty"` EventProcessors []string `mapstructure:"event-processors,omitempty"` }
Config //
type StanOutput ¶
type StanOutput struct { Cfg *Config // contains filtered or unexported fields }
StanOutput //
func (*StanOutput) Init ¶
func (s *StanOutput) Init(ctx context.Context, name string, cfg map[string]interface{}, opts ...outputs.Option) error
Init //
func (*StanOutput) RegisterMetrics ¶
func (s *StanOutput) RegisterMetrics(reg *prometheus.Registry)
Metrics //
func (*StanOutput) SetClusterName ¶
func (s *StanOutput) SetClusterName(name string)
func (*StanOutput) SetEventProcessors ¶
func (*StanOutput) SetLogger ¶
func (s *StanOutput) SetLogger(logger *log.Logger)
func (*StanOutput) SetName ¶
func (s *StanOutput) SetName(name string)
func (*StanOutput) SetTargetsConfig ¶
func (s *StanOutput) SetTargetsConfig(map[string]*types.TargetConfig)
func (*StanOutput) String ¶
func (s *StanOutput) String() string
func (*StanOutput) Write ¶
func (s *StanOutput) Write(ctx context.Context, rsp protoreflect.ProtoMessage, meta outputs.Meta)
Write //
func (*StanOutput) WriteEvent ¶
func (s *StanOutput) WriteEvent(ctx context.Context, ev *formatters.EventMsg)
Click to show internal directories.
Click to hide internal directories.