Documentation ¶
Overview ¶
Package event is a generated GoMock package.
Index ¶
- Constants
- func CloseManager()
- func GetCallbackLoggerOption() map[string]string
- func GetLastLoggerOption() map[string]string
- func GetLoggerOption(status string) map[string]string
- func GetTimeoutLoggerOption() map[string]string
- func NewManager(conf EventConfig) error
- func NewTestManager(m Manager)
- type EventConfig
- type Logger
- type LoggerWriter
- type Manager
- type MockLogger
- func (m *MockLogger) CreateTime() time.Time
- func (m *MockLogger) Debug(arg0 string, arg1 map[string]string)
- func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
- func (m *MockLogger) Error(arg0 string, arg1 map[string]string)
- func (m *MockLogger) Event() string
- func (m *MockLogger) GetChan() chan []byte
- func (m *MockLogger) GetWriter(step, level string) LoggerWriter
- func (m *MockLogger) Info(arg0 string, arg1 map[string]string)
- func (m *MockLogger) SetChan(arg0 chan []byte)
- type MockLoggerMockRecorder
- func (mr *MockLoggerMockRecorder) CreateTime() *gomock.Call
- func (mr *MockLoggerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Error(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Event() *gomock.Call
- func (mr *MockLoggerMockRecorder) GetChan() *gomock.Call
- func (mr *MockLoggerMockRecorder) GetWriter(step, level interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockLoggerMockRecorder) SetChan(arg0 interface{}) *gomock.Call
- type MockLoggerWriter
- type MockLoggerWriterMockRecorder
- type MockManager
- type MockManagerMockRecorder
Constants ¶
const ( //REQUESTTIMEOUT time out REQUESTTIMEOUT = 1000 * time.Millisecond //MAXRETRIES 重试 MAXRETRIES = 3 // Before we abandon )
Variables ¶
This section is empty.
Functions ¶
func GetCallbackLoggerOption ¶
GetCallbackLoggerOption get callback logger
func GetLastLoggerOption ¶
GetLastLoggerOption get last logger
func GetTimeoutLoggerOption ¶
GetTimeoutLoggerOption get callback logger
Types ¶
type EventConfig ¶
EventConfig event config struct
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 日志发送器
type LoggerWriter ¶
LoggerWriter logger writer
type Manager ¶
type Manager interface { GetLogger(eventID string) Logger Start() error Close() error ReleaseLogger(Logger) }
Manager 操作日志,客户端服务 客户端负载均衡
type MockLogger ¶
type MockLogger struct {
// contains filtered or unexported fields
}
MockLogger is a mock of Logger interface
func NewMockLogger ¶
func NewMockLogger(ctrl *gomock.Controller) *MockLogger
NewMockLogger creates a new mock instance
func (*MockLogger) CreateTime ¶
func (m *MockLogger) CreateTime() time.Time
CreateTime mocks base method
func (*MockLogger) Debug ¶
func (m *MockLogger) Debug(arg0 string, arg1 map[string]string)
Debug mocks base method
func (*MockLogger) EXPECT ¶
func (m *MockLogger) EXPECT() *MockLoggerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockLogger) Error ¶
func (m *MockLogger) Error(arg0 string, arg1 map[string]string)
Error mocks base method
func (*MockLogger) GetWriter ¶
func (m *MockLogger) GetWriter(step, level string) LoggerWriter
GetWriter mocks base method
func (*MockLogger) Info ¶
func (m *MockLogger) Info(arg0 string, arg1 map[string]string)
Info mocks base method
func (*MockLogger) SetChan ¶
func (m *MockLogger) SetChan(arg0 chan []byte)
SetChan mocks base method
type MockLoggerMockRecorder ¶
type MockLoggerMockRecorder struct {
// contains filtered or unexported fields
}
MockLoggerMockRecorder is the mock recorder for MockLogger
func (*MockLoggerMockRecorder) CreateTime ¶
func (mr *MockLoggerMockRecorder) CreateTime() *gomock.Call
CreateTime indicates an expected call of CreateTime
func (*MockLoggerMockRecorder) Debug ¶
func (mr *MockLoggerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call
Debug indicates an expected call of Debug
func (*MockLoggerMockRecorder) Error ¶
func (mr *MockLoggerMockRecorder) Error(arg0, arg1 interface{}) *gomock.Call
Error indicates an expected call of Error
func (*MockLoggerMockRecorder) Event ¶
func (mr *MockLoggerMockRecorder) Event() *gomock.Call
Event indicates an expected call of Event
func (*MockLoggerMockRecorder) GetChan ¶
func (mr *MockLoggerMockRecorder) GetChan() *gomock.Call
GetChan indicates an expected call of GetChan
func (*MockLoggerMockRecorder) GetWriter ¶
func (mr *MockLoggerMockRecorder) GetWriter(step, level interface{}) *gomock.Call
GetWriter indicates an expected call of GetWriter
func (*MockLoggerMockRecorder) Info ¶
func (mr *MockLoggerMockRecorder) Info(arg0, arg1 interface{}) *gomock.Call
Info indicates an expected call of Info
func (*MockLoggerMockRecorder) SetChan ¶
func (mr *MockLoggerMockRecorder) SetChan(arg0 interface{}) *gomock.Call
SetChan indicates an expected call of SetChan
type MockLoggerWriter ¶
type MockLoggerWriter struct {
// contains filtered or unexported fields
}
MockLoggerWriter is a mock of LoggerWriter interface
func NewMockLoggerWriter ¶
func NewMockLoggerWriter(ctrl *gomock.Controller) *MockLoggerWriter
NewMockLoggerWriter creates a new mock instance
func (*MockLoggerWriter) EXPECT ¶
func (m *MockLoggerWriter) EXPECT() *MockLoggerWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockLoggerWriter) SetFormat ¶
func (m *MockLoggerWriter) SetFormat(arg0 map[string]interface{})
SetFormat mocks base method
type MockLoggerWriterMockRecorder ¶
type MockLoggerWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockLoggerWriterMockRecorder is the mock recorder for MockLoggerWriter
func (*MockLoggerWriterMockRecorder) SetFormat ¶
func (mr *MockLoggerWriterMockRecorder) SetFormat(arg0 interface{}) *gomock.Call
SetFormat indicates an expected call of SetFormat
func (*MockLoggerWriterMockRecorder) Write ¶
func (mr *MockLoggerWriterMockRecorder) Write(p interface{}) *gomock.Call
Write indicates an expected call of Write
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockManager) GetLogger ¶
func (m *MockManager) GetLogger(eventID string) Logger
GetLogger mocks base method
func (*MockManager) ReleaseLogger ¶
func (m *MockManager) ReleaseLogger(arg0 Logger)
ReleaseLogger mocks base method
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager
func (*MockManagerMockRecorder) Close ¶
func (mr *MockManagerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockManagerMockRecorder) GetLogger ¶
func (mr *MockManagerMockRecorder) GetLogger(eventID interface{}) *gomock.Call
GetLogger indicates an expected call of GetLogger
func (*MockManagerMockRecorder) ReleaseLogger ¶
func (mr *MockManagerMockRecorder) ReleaseLogger(arg0 interface{}) *gomock.Call
ReleaseLogger indicates an expected call of ReleaseLogger
func (*MockManagerMockRecorder) Start ¶
func (mr *MockManagerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start