outputredis

package
v0.0.0-...-3e9a38d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: LGPL-3.0 Imports: 6 Imported by: 0

README

gogstash output redis

Synopsis

{
	"output": [
		{
			"type": "redis",

			// (optional)
			"key": "gogstash",

			// (required)
			"host": [""],

			// (optional), default: "list"
			"data_type": "list",

			// (optional), in seconds, default: 5
			"timeout": 5

			// (optional), in seconds, default: 1
			"reconnect_interval": 1
		}
	]
}

Details

  • type
    • Must be "redis"
  • key
    • The name of a Redis list or channel. Dynamic names are valid here, for example “gogstash-%{host}”.
  • host
    • The hostname(s) and port(s) of your Redis server(s). Only one of redis server will be notify. When using redis master/slave, list all redis servers.
["127.0.0.1:6379", "10.20.30.40:6379"]
  • timeout
    • Redis initial connection timeout in seconds.
  • reconnect_interval
    • Interval for reconnecting to failed Redis connections.

Documentation

Index

Constants

View Source
const (
	ModuleName = "redis"
)

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(confraw *config.ConfigRaw) (retconf config.TypeOutputConfig, err error)

Types

type OutputConfig

type OutputConfig struct {
	config.OutputConfig
	Key               string   `json:"key"`
	Host              []string `json:"host"`
	DataType          string   `json:"data_type,omitempty"` // one of ["list", "channel"]
	Timeout           int      `json:"timeout,omitempty"`
	ReconnectInterval int      `json:"reconnect_interval,omitempty"`
	// contains filtered or unexported fields
}

func DefaultOutputConfig

func DefaultOutputConfig() OutputConfig

func (*OutputConfig) Event

func (self *OutputConfig) Event(event logevent.LogEvent) (err error)

Jump to

Keyboard shortcuts

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