rainbond: github.com/goodrain/rainbond/event Index | Files

package event

import "github.com/goodrain/rainbond/event"

Index

Package Files

manager.go

Constants

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

)

func CloseManager Uses

func CloseManager()

CloseManager 关闭日志服务

func NewManager Uses

func NewManager(conf EventConfig) error

NewManager 创建manager

type EventConfig Uses

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

type Logger Uses

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 Uses

func GetTestLogger() Logger

GetTestLogger GetTestLogger

type LoggerWriter Uses

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

LoggerWriter logger writer

type Manager Uses

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

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

func GetManager Uses

func GetManager() Manager

GetManager 获取日志服务

Package event imports 15 packages (graph) and is imported by 18 packages. Updated 2018-12-16. Refresh now. Tools for package owners.