fluenttest

package module
v0.0.0-...-1d3e679 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 10 Imported by: 0

README

fluentd/fluenttest

Basic test utilities

  • an extremely minimalstic "fluentest.Server"
  • a FluentD fluenttest.Message object representing a decoded log payload for the FluentD Message event mode

Documentation

Overview

fluenttest provides Fluentd logging stack testing utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Tag    string
	Time   time.Time
	Record map[string]any
}

func (*Message) DecodeMsgpack

func (m *Message) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack deserializes the payload, which is expected to conform to the FLuentD Message event mode format. [

 	tag<string>,
	time<EventTime | int>,
	record<map[string]any>,
	option<optional map[string]any>

]

type TestServer

type TestServer struct {
	Listener  net.Listener
	MessageCh chan *Message
	Network   string
	Port      int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(network, host string) (*TestServer, error)

func (*TestServer) Shutdown

func (s *TestServer) Shutdown()

Jump to

Keyboard shortcuts

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