nats_output

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	ConnectTimeWait time.Duration `mapstructure:"connect-time-wait,omitempty"`
	Format          string        `mapstructure:"format,omitempty"`
}

Config //

type NatsOutput

type NatsOutput struct {
	Cfg *Config
	// contains filtered or unexported fields
}

NatsOutput //

func (*NatsOutput) Close

func (n *NatsOutput) Close() error

Close //

func (*NatsOutput) Dial

func (n *NatsOutput) Dial(network, address string) (net.Conn, error)

Dial //

func (*NatsOutput) Init

func (n *NatsOutput) Init(ctx context.Context, cfg map[string]interface{}, logger *log.Logger) error

Init //

func (*NatsOutput) Metrics

func (n *NatsOutput) Metrics() []prometheus.Collector

Metrics //

func (*NatsOutput) String

func (n *NatsOutput) String() string

func (*NatsOutput) Write

func (n *NatsOutput) Write(_ context.Context, rsp proto.Message, meta outputs.Meta)

Write //

Jump to

Keyboard shortcuts

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