flume_log

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlumeClient

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

func NewFlumeClient

func NewFlumeClient(agentIP string) *FlumeClient

func (*FlumeClient) SendLog

func (c *FlumeClient) SendLog(d []byte) error

func (*FlumeClient) Stop

func (c *FlumeClient) Stop()

Stop closes conn

type LogBody

type LogBody struct {
	App      string                 `json:"app"`
	Level    string                 `json:"level"`
	Module   string                 `json:"module"`
	Tag      string                 `json:"tag"`
	Detail   map[string]interface{} `json:"detail,omitempty"`
	Platform string                 `json:"platform"`
}

func (*LogBody) Bytes

func (body *LogBody) Bytes() []byte

type LogHeader

type LogHeader struct {
	Level    string
	AppName  string
	LogIndex string
}

func (*LogHeader) String

func (header *LogHeader) String() string

type LogItem

type LogItem struct {
	Header LogHeader
	Body   LogBody
}

func NewLogItem

func NewLogItem(level string, appName string, logIndex string) *LogItem

func (*LogItem) Bytes

func (self *LogItem) Bytes() []byte

func (*LogItem) SetDetail

func (self *LogItem) SetDetail(detail map[string]interface{})

func (*LogItem) SetTag

func (self *LogItem) SetTag(tag string)

type RemoteLogClient

type RemoteLogClient struct {
	AppName       string
	LogIndex      string
	ServerAddress string
	// contains filtered or unexported fields
}

RemoteLogClient describes the remote log client

func NewClient

func NewClient(address string, appName string, logIndex string) *RemoteLogClient

NewClient returns a RemoteLogClient

func (*RemoteLogClient) Debug

func (rlc *RemoteLogClient) Debug(msg string, extra interface{}) error

Debug uses debug-level

func (*RemoteLogClient) Error

func (rlc *RemoteLogClient) Error(msg string, extra interface{}) error

Error uses error-level

func (*RemoteLogClient) Info

func (rlc *RemoteLogClient) Info(msg string, extra interface{}) error

Info uses info-level

func (*RemoteLogClient) Stop

func (rlc *RemoteLogClient) Stop()

Stop stops all conns

func (*RemoteLogClient) Warn

func (rlc *RemoteLogClient) Warn(msg string, extra interface{}) error

Warn uses warn-level

Jump to

Keyboard shortcuts

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