event

package
v3.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: LGPL-3.0 Imports: 12 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)
}

Logger 日志发送器

func GetTestLogger

func GetTestLogger() Logger

GetTestLogger GetTestLogger

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