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

package event

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

Package event is a generated GoMock package.

Index

Package Files

log_optoins.go manager.go manager_mock.go

Constants

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

)

func CloseManager Uses

func CloseManager()

CloseManager 关闭日志服务

func GetCallbackLoggerOption Uses

func GetCallbackLoggerOption() map[string]string

GetCallbackLoggerOption get callback logger

func GetLastLoggerOption Uses

func GetLastLoggerOption() map[string]string

GetLastLoggerOption get last logger

func GetLoggerOption Uses

func GetLoggerOption(status string) map[string]string

GetLoggerOption -

func GetTimeoutLoggerOption Uses

func GetTimeoutLoggerOption() map[string]string

GetTimeoutLoggerOption get callback logger

func NewManager Uses

func NewManager(conf EventConfig) error

NewManager 创建manager

func NewTestManager Uses

func NewTestManager(m Manager)

NewTestManager -

type EventConfig Uses

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

EventConfig event config struct

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

func NewLogger Uses

func NewLogger(eventID string, sendCh chan []byte) Logger

NewLogger creates a new Logger.

type LoggerWriter Uses

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

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 获取日志服务

type MockLogger Uses

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

MockLogger is a mock of Logger interface

func NewMockLogger Uses

func NewMockLogger(ctrl *gomock.Controller) *MockLogger

NewMockLogger creates a new mock instance

func (*MockLogger) CreateTime Uses

func (m *MockLogger) CreateTime() time.Time

CreateTime mocks base method

func (*MockLogger) Debug Uses

func (m *MockLogger) Debug(arg0 string, arg1 map[string]string)

Debug mocks base method

func (*MockLogger) EXPECT Uses

func (m *MockLogger) EXPECT() *MockLoggerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockLogger) Error Uses

func (m *MockLogger) Error(arg0 string, arg1 map[string]string)

Error mocks base method

func (*MockLogger) Event Uses

func (m *MockLogger) Event() string

Event mocks base method

func (*MockLogger) GetChan Uses

func (m *MockLogger) GetChan() chan []byte

GetChan mocks base method

func (*MockLogger) GetWriter Uses

func (m *MockLogger) GetWriter(step, level string) LoggerWriter

GetWriter mocks base method

func (*MockLogger) Info Uses

func (m *MockLogger) Info(arg0 string, arg1 map[string]string)

Info mocks base method

func (*MockLogger) SetChan Uses

func (m *MockLogger) SetChan(arg0 chan []byte)

SetChan mocks base method

type MockLoggerMockRecorder Uses

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

MockLoggerMockRecorder is the mock recorder for MockLogger

func (*MockLoggerMockRecorder) CreateTime Uses

func (mr *MockLoggerMockRecorder) CreateTime() *gomock.Call

CreateTime indicates an expected call of CreateTime

func (*MockLoggerMockRecorder) Debug Uses

func (mr *MockLoggerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call

Debug indicates an expected call of Debug

func (*MockLoggerMockRecorder) Error Uses

func (mr *MockLoggerMockRecorder) Error(arg0, arg1 interface{}) *gomock.Call

Error indicates an expected call of Error

func (*MockLoggerMockRecorder) Event Uses

func (mr *MockLoggerMockRecorder) Event() *gomock.Call

Event indicates an expected call of Event

func (*MockLoggerMockRecorder) GetChan Uses

func (mr *MockLoggerMockRecorder) GetChan() *gomock.Call

GetChan indicates an expected call of GetChan

func (*MockLoggerMockRecorder) GetWriter Uses

func (mr *MockLoggerMockRecorder) GetWriter(step, level interface{}) *gomock.Call

GetWriter indicates an expected call of GetWriter

func (*MockLoggerMockRecorder) Info Uses

func (mr *MockLoggerMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call

Info indicates an expected call of Info

func (*MockLoggerMockRecorder) SetChan Uses

func (mr *MockLoggerMockRecorder) SetChan(arg0 interface{}) *gomock.Call

SetChan indicates an expected call of SetChan

type MockLoggerWriter Uses

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

MockLoggerWriter is a mock of LoggerWriter interface

func NewMockLoggerWriter Uses

func NewMockLoggerWriter(ctrl *gomock.Controller) *MockLoggerWriter

NewMockLoggerWriter creates a new mock instance

func (*MockLoggerWriter) EXPECT Uses

func (m *MockLoggerWriter) EXPECT() *MockLoggerWriterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockLoggerWriter) SetFormat Uses

func (m *MockLoggerWriter) SetFormat(arg0 string)

SetFormat mocks base method

func (*MockLoggerWriter) Write Uses

func (m *MockLoggerWriter) Write(p []byte) (int, error)

Write mocks base method

type MockLoggerWriterMockRecorder Uses

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

MockLoggerWriterMockRecorder is the mock recorder for MockLoggerWriter

func (*MockLoggerWriterMockRecorder) SetFormat Uses

func (mr *MockLoggerWriterMockRecorder) SetFormat(arg0 interface{}) *gomock.Call

SetFormat indicates an expected call of SetFormat

func (*MockLoggerWriterMockRecorder) Write Uses

func (mr *MockLoggerWriterMockRecorder) Write(p interface{}) *gomock.Call

Write indicates an expected call of Write

type MockManager Uses

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

MockManager is a mock of Manager interface

func NewMockManager Uses

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance

func (*MockManager) Close Uses

func (m *MockManager) Close() error

Close mocks base method

func (*MockManager) EXPECT Uses

func (m *MockManager) EXPECT() *MockManagerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockManager) GetLogger Uses

func (m *MockManager) GetLogger(eventID string) Logger

GetLogger mocks base method

func (*MockManager) ReleaseLogger Uses

func (m *MockManager) ReleaseLogger(arg0 Logger)

ReleaseLogger mocks base method

func (*MockManager) Start Uses

func (m *MockManager) Start() error

Start mocks base method

type MockManagerMockRecorder Uses

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

MockManagerMockRecorder is the mock recorder for MockManager

func (*MockManagerMockRecorder) Close Uses

func (mr *MockManagerMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockManagerMockRecorder) GetLogger Uses

func (mr *MockManagerMockRecorder) GetLogger(eventID interface{}) *gomock.Call

GetLogger indicates an expected call of GetLogger

func (*MockManagerMockRecorder) ReleaseLogger Uses

func (mr *MockManagerMockRecorder) ReleaseLogger(arg0 interface{}) *gomock.Call

ReleaseLogger indicates an expected call of ReleaseLogger

func (*MockManagerMockRecorder) Start Uses

func (mr *MockManagerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start

Package event imports 16 packages (graph) and is imported by 21 packages. Updated 2019-08-29. Refresh now. Tools for package owners.