event

package
v0.0.0-...-a3a5c94 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package event is a generated GoMock package.

Index

Constants

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

)

Variables

This section is empty.

Functions

func CloseManager

func CloseManager()

CloseManager

func GetCallbackLoggerOption

func GetCallbackLoggerOption() map[string]string

GetCallbackLoggerOption

func GetLastLoggerOption

func GetLastLoggerOption() map[string]string

GetLastLoggerOption

func GetLoggerOption

func GetLoggerOption(status string) map[string]string

GetLoggerOption

func GetTimeoutLoggerOption

func GetTimeoutLoggerOption() map[string]string

GetTimeoutLoggerOption

func NewManager

func NewManager(conf EventConfig) error

NewManager

func NewTestManager

func NewTestManager(m Manager)

NewTestManager

Types

type EventConfig

type EventConfig struct {
	EventLogServers []string
	DiscoverArgs    *etcdutil.ClientArgs
}

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

func GetTestLogger

func GetTestLogger() Logger

GetTestLogger

func NewLogger

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

NewLogger

type LoggerWriter

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

LoggerWriter

type Manager

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

Manager Operation log, client service Client load balancing

func GetManager

func GetManager() Manager

GetManager

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) Event

func (m *MockLogger) Event() string

Event mocks base method

func (*MockLogger) GetChan

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

GetChan 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

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

func (*MockLoggerWriter) Write

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

Write 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) Close

func (m *MockManager) Close() error

Close mocks base method

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

func (*MockManager) Start

func (m *MockManager) Start() error

Start 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

Jump to

Keyboard shortcuts

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