gopapi

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

gopapi

public API for LogDoc go plugins

Documentation

Overview

Package gopapi public API for LogDoc go plugins

Index

Constants

View Source
const (
	SOURCE_TIME     string = "tsrc"
	PROCESS_ID      string = "pid"
	LOG_SOURCE      string = "src"
	LEVEL           string = "lvl"
	ENTRY           string = "msg"
	RECEIVE_TIME    string = "trcv"
	SOURCE_IP       string = "ip"
	SOURCE_APP_NAME string = "app"
)
View Source
const (
	DEBUG int = iota
	INFO
	LOG
	WARN
	ERROR
	SEVERE
	PANIC
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionType

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

type LogEntry

type LogEntry struct {
	Ip      string
	SrcTime string
	RcvTime string
	Pid     string
	Source  string
	Entry   string
	AppName string
	Level   int
	// contains filtered or unexported fields
}

func (*LogEntry) GetField

func (e *LogEntry) GetField(name string) string

func (*LogEntry) SetField

func (e *LogEntry) SetField(nameRaw string, value string)

type SinkPlugin

type SinkPlugin interface {
	ConfigSectionName() string
	Configure(interface{})
	SetEntryConsumer(func(entry LogEntry))
	SupportedTypes() []ConnectionType

	Chunk(chunk []byte, source string) []byte
}

Jump to

Keyboard shortcuts

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