event

package
v3.7.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: LGPL-3.0 Imports: 15 Imported by: 96

Documentation

Index

Constants

View Source
const (
	//REQUESTTIMEOUT  time out
	REQUESTTIMEOUT = 1000 * time.Millisecond
	//MAXRETRIES 重试
	MAXRETRIES = 3 //  Before we abandon

)

Variables

This section is empty.

Functions

func CloseManager

func CloseManager()

CloseManager 关闭日志服务

func NewManager

func NewManager(conf EventConfig) error

NewManager 创建manager

Types

type EventConfig

type EventConfig struct {
	EventLogServers []string
	DiscoverAddress []string
}

type Logger

type Logger interface {
	Info(string, map[string]string)
	Error(string, map[string]string)
	Debug(string, map[string]string)
	Event() string
	CreateTime() time.Time
	GetChan() chan []byte
	SetChan(chan []byte)
	GetWriter(step, level string) LoggerWriter
}

Logger 日志发送器

func GetTestLogger

func GetTestLogger() Logger

GetTestLogger GetTestLogger

type LoggerWriter

type LoggerWriter interface {
	io.Writer
	SetFormat(string)
}

LoggerWriter logger writer

type Manager

type Manager interface {
	GetLogger(eventID string) Logger
	Start() error
	Close() error
	ReleaseLogger(Logger)
}

Manager 操作日志,客户端服务 客户端负载均衡

func GetManager

func GetManager() Manager

GetManager 获取日志服务

Jump to

Keyboard shortcuts

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