stan_output

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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"`
	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) Close

func (s *StanOutput) Close() error

Close //

func (*StanOutput) Init

func (s *StanOutput) Init(ctx context.Context, name string, cfg map[string]interface{}, opts ...outputs.Option) error

Init //

func (*StanOutput) RegisterMetrics added in v0.7.0

func (s *StanOutput) RegisterMetrics(reg *prometheus.Registry)

Metrics //

func (*StanOutput) SetClusterName added in v0.8.0

func (s *StanOutput) SetClusterName(name string)

func (*StanOutput) SetEventProcessors added in v0.6.0

func (s *StanOutput) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, tcs map[string]interface{})

func (*StanOutput) SetLogger added in v0.5.2

func (s *StanOutput) SetLogger(logger *log.Logger)

func (*StanOutput) SetName added in v0.7.0

func (s *StanOutput) SetName(name string)

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 added in v0.7.0

func (s *StanOutput) WriteEvent(ctx context.Context, ev *formatters.EventMsg)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL