structstream

package
v0.0.0-...-1b8e598 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func New

func New(cap int, tr Transformer) (*Buffer, error)

func (*Buffer) Append

func (b *Buffer) Append(meta, line string)

func (*Buffer) Clear

func (b *Buffer) Clear()

func (*Buffer) GetAt

func (b *Buffer) GetAt(loc int) Structline

func (*Buffer) GetRange

func (b *Buffer) GetRange(st, fi int) []Structline

func (*Buffer) Len

func (b *Buffer) Len() int

type Structline

type Structline struct {
	Complete bool
	Type     string

	Message   string
	Meta      string
	Priority  string
	Timestamp time.Time

	KV map[string]interface{}
}

func GlogTransformer

func GlogTransformer(meta, in string) (Structline, bool)

func JSONTransformer

func JSONTransformer(meta, in string) (Structline, bool)

func PassthruTransformer

func PassthruTransformer(meta, in string) (Structline, bool)

type Transformer

type Transformer func(string, string) (Structline, bool)

func CombineTransformers

func CombineTransformers(strict bool, ts ...Transformer) Transformer

Jump to

Keyboard shortcuts

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