nats_input

package
v0.36.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 17 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"`
	Subject         string           `mapstructure:"subject,omitempty"`
	Queue           string           `mapstructure:"queue,omitempty"`
	Username        string           `mapstructure:"username,omitempty"`
	Password        string           `mapstructure:"password,omitempty"`
	ConnectTimeWait time.Duration    `mapstructure:"connect-time-wait,omitempty"`
	TLS             *types.TLSConfig `mapstructure:"tls,omitempty" json:"tls,omitempty"`
	Format          string           `mapstructure:"format,omitempty"`
	Debug           bool             `mapstructure:"debug,omitempty"`
	NumWorkers      int              `mapstructure:"num-workers,omitempty"`
	BufferSize      int              `mapstructure:"buffer-size,omitempty"`
	Outputs         []string         `mapstructure:"outputs,omitempty"`
	EventProcessors []string         `mapstructure:"event-processors,omitempty"`
}

Config //

type NatsInput

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

NatsInput //

func (*NatsInput) Close

func (n *NatsInput) Close() error

Close //

func (*NatsInput) Dial

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

Dial //

func (*NatsInput) SetEventProcessors

func (n *NatsInput) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, tcs map[string]*types.TargetConfig, acts map[string]map[string]interface{}) error

func (*NatsInput) SetLogger

func (n *NatsInput) SetLogger(logger *log.Logger)

SetLogger //

func (*NatsInput) SetName

func (n *NatsInput) SetName(name string)

func (*NatsInput) SetOutputs

func (n *NatsInput) SetOutputs(outs map[string]outputs.Output)

SetOutputs //

func (*NatsInput) Start

func (n *NatsInput) Start(ctx context.Context, name string, cfg map[string]interface{}, opts ...inputs.Option) error

Init //

Jump to

Keyboard shortcuts

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