nsq

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 NSQ

NSQ is a realtime distributed messaging platform.

Synopsis

input:
  - type: "nsq"

    # NSQd port if connection directly to a daemon
    nsq: "localhost:4150"

    # lookupd if using the NSQ directory service
    lookupd: "server:4160"

    # topic is the topic to subscribe to
    topic: "mytopic"

    #channel is the channel you want messages from
    channel: "mychannel"

    # (optional) The number of inflight messages to handle, default is 75
    max_inflight: 75

Documentation

Index

Constants

View Source
const ModuleName = "nsq"

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
	NSQ      string `json:"nsq" yaml:"nsq"`                   // NSQd to connect to
	Lookupd  string `json:"lookupd" yaml:"lookupd"`           // lookupd to connect to, can be a NSQd or lookupd
	Topic    string `json:"topic" yaml:"topic"`               // topic to listen from
	Channel  string `json:"channel" yaml:"channel"`           // channel to subscribe to
	InFlight uint   `json:"max_inflight" yaml:"max_inflight"` // max number of messages inflight
	// 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 (t *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