Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultMaxPayloadSize = 1024 * 1024
View Source
const DnstapFstrmControlHeaderSize = 42
View Source
const DnstapFstrmMsgHeaderSize = 4
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
func Setup(bs json.RawMessage) (types.OutputPlugin, error)
Types ¶
type Nats ¶
type Nats struct { plugin.PluginCommon sync.Mutex *output.DnstapOutput // Hosts is the URL of the nats servers. Must not be empty. Hosts []string // Nats subject. Must not be empty. Subject string // Nats user, If a token is given, it is not used. User string // Nats password, If a token is given, it is not used. Password string // Nats token Token string // Max nats message size. Default is 1KByte. MaxSize int // Interval to flush nats messages. IntervalSec uint // Nats message format. Format pub.Format // contains filtered or unexported fields }
The nats plugin outputs messages to the nats server. DTAPFrame or DNSTAP messages are taken from the Output Buffer and pushed together to the nats server. The timing of the push is when the size of the nats message is exceeded or when the number of seconds specified by IntervalSec elapses.
func (*Nats) SetOutputContext ¶
func (f *Nats) SetOutputContext(oc *types.OutputContext)
Click to show internal directories.
Click to hide internal directories.