inputnats

package
v0.0.0-...-c13075e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 7 Imported by: 0

README

gogstash input nats

Synopsis

input:
  # type Must be "nats"
  - type: "nats"

    # nats server host:port, default: "nats://localhost:4222"
    host: "nats://localhost:4222"

    # creditials for nats, default: ""
    creds: ""

    # topics to subscribe, use , between topic
    topic: "test.*"

Documentation

Index

Constants

View Source
const ErrorTag = "gogstash_input_nats_error"

ErrorTag tag added to event when process module failed

View Source
const ModuleName = "nats"

ModuleName is the name used in config file

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(
	ctx context.Context,
	raw config.ConfigRaw,
	control config.Control,
) (config.TypeInputConfig, error)

InitHandler initialize the input plugin

Types

type InputConfig

type InputConfig struct {
	config.InputConfig
	Host  string `json:"host"`  // redis server host:port, default: "localhost:6379"
	Creds string `json:"creds"` // where to get data, default: "gogstash"
	Topic string `json:"topic"` // topics to receive
	// contains filtered or unexported fields
}

InputConfig holds the configuration json fields and internal objects

func DefaultInputConfig

func DefaultInputConfig() InputConfig

DefaultInputConfig returns an InputConfig struct with default values

func (*InputConfig) Start

func (i *InputConfig) Start(ctx context.Context, msgChan chan<- logevent.LogEvent) error

Start wraps the actual function starting the plugin

Jump to

Keyboard shortcuts

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