Documentation ¶
Overview ¶
Interfaces related to setting up or mocking remote logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetImpl ¶
func SetImpl(r RemoteLoggerSetuper)
sets the underlying RemoteLoggerSetuper impl for this package
func SetMockImpl ¶
func SetMockImpl(m RemoteLoggerMocker)
sets the underlying RemoteLoggerMocker impl for this package
Types ¶
type MockSrvr ¶
type MockSrvr interface { //frees resources Close() //returns port it listens on Port() int //return true if current state is that the given stage is finished CheckFinished(id, stage string) bool //returns all log entries as text, format is impl-defined Entries(id string) string //returns all ids that have been used while adding log entries, macs, ipmi macs Ids() []string //returns credentials mock server will hand out MockCreds(id string) common.Credentials }
func MockServer ¶
func MockServerAt ¶
type RemoteLoggerMocker ¶
type RemoteLoggerMocker interface { //Sets up a mock remote logger. MockServer(f Fataler, tmpDir string) MockSrvr //Like MockServer, but you specify the port MockServerAt(f Fataler, tmpDir, port string) MockSrvr }
Sets up a mock remote log server; used in conjunction with a RemoteLoggerSetuper in tests (generally, but not exclusively, integration tests).
type RemoteLoggerSetuper ¶
Sets up a remote logger on demand.
Click to show internal directories.
Click to hide internal directories.