Documentation ¶
Index ¶
- type Logger
- type LoggerImpl
- func (l *LoggerImpl) GetLogger() hclog.Logger
- func (l *LoggerImpl) GetStatsD() *statsd.Client
- func (l *LoggerImpl) ProviderConnectionCreated(p providers.Provider)
- func (l *LoggerImpl) ProviderConnectionFailed(p providers.Provider, err error)
- func (l *LoggerImpl) ProviderMessagePublished(p providers.Provider, m *providers.Message)
- func (l *LoggerImpl) ProviderSubcriptionCreated(p providers.Provider)
- func (l *LoggerImpl) ProviderSubcriptionFailed(p providers.Provider, err error)
- func (l *LoggerImpl) ServerActionPublish(pi *pipe.Pipe, m *providers.Message)
- func (l *LoggerImpl) ServerActionPublishFailed(pi *pipe.Pipe, m *providers.Message, err error)
- func (l *LoggerImpl) ServerActionPublishSuccess(pi *pipe.Pipe, m *providers.Message)
- func (l *LoggerImpl) ServerFailPublish(pi *pipe.Pipe, a *pipe.Action, m *providers.Message)
- func (l *LoggerImpl) ServerFailPublishFailed(pi *pipe.Pipe, a *pipe.Action, m *providers.Message, err error)
- func (l *LoggerImpl) ServerFailPublishSuccess(pi *pipe.Pipe, a *pipe.Action, m *providers.Message)
- func (l *LoggerImpl) ServerHandleMessageExpired(pi *pipe.Pipe, m *providers.Message)
- func (l *LoggerImpl) ServerNewMessageReceivedStart(pi *pipe.Pipe, m *providers.Message) *LoggerTiming
- func (l *LoggerImpl) ServerNoPipesConfigured(p providers.Provider)
- func (l *LoggerImpl) ServerSuccessPublish(pi *pipe.Pipe, a *pipe.Action, m *providers.Message)
- func (l *LoggerImpl) ServerSuccessPublishFailed(pi *pipe.Pipe, a *pipe.Action, m *providers.Message, err error)
- func (l *LoggerImpl) ServerSuccessPublishSuccess(pi *pipe.Pipe, a *pipe.Action, m *providers.Message)
- func (l *LoggerImpl) ServerTemplateProcessFail(a *pipe.Action, data []byte, err error)
- func (l *LoggerImpl) ServerTemplateProcessStart(a *pipe.Action, data []byte) *LoggerTiming
- func (l *LoggerImpl) ServerTemplateProcessSuccess(a *pipe.Action, data []byte)
- func (l *LoggerImpl) ServerUnableToListen(p providers.Provider, err error)
- type LoggerMock
- func (mock *LoggerMock) GetLogger() hclog.Logger
- func (mock *LoggerMock) GetLoggerCalls() []struct{}
- func (mock *LoggerMock) GetStatsD() *statsd.Client
- func (mock *LoggerMock) GetStatsDCalls() []struct{}
- func (mock *LoggerMock) ProviderConnectionCreated(in1 providers.Provider)
- func (mock *LoggerMock) ProviderConnectionCreatedCalls() []struct{ ... }
- func (mock *LoggerMock) ProviderConnectionFailed(in1 providers.Provider, in2 error)
- func (mock *LoggerMock) ProviderConnectionFailedCalls() []struct{ ... }
- func (mock *LoggerMock) ProviderMessagePublished(in1 providers.Provider, in2 *providers.Message)
- func (mock *LoggerMock) ProviderMessagePublishedCalls() []struct{ ... }
- func (mock *LoggerMock) ProviderSubcriptionCreated(in1 providers.Provider)
- func (mock *LoggerMock) ProviderSubcriptionCreatedCalls() []struct{ ... }
- func (mock *LoggerMock) ProviderSubcriptionFailed(in1 providers.Provider, in2 error)
- func (mock *LoggerMock) ProviderSubcriptionFailedCalls() []struct{ ... }
- func (mock *LoggerMock) ServerActionPublish(in1 *pipe.Pipe, in2 *providers.Message)
- func (mock *LoggerMock) ServerActionPublishCalls() []struct{ ... }
- func (mock *LoggerMock) ServerActionPublishFailed(in1 *pipe.Pipe, in2 *providers.Message, in3 error)
- func (mock *LoggerMock) ServerActionPublishFailedCalls() []struct{ ... }
- func (mock *LoggerMock) ServerActionPublishSuccess(in1 *pipe.Pipe, in2 *providers.Message)
- func (mock *LoggerMock) ServerActionPublishSuccessCalls() []struct{ ... }
- func (mock *LoggerMock) ServerFailPublish(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
- func (mock *LoggerMock) ServerFailPublishCalls() []struct{ ... }
- func (mock *LoggerMock) ServerFailPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error)
- func (mock *LoggerMock) ServerFailPublishFailedCalls() []struct{ ... }
- func (mock *LoggerMock) ServerFailPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
- func (mock *LoggerMock) ServerFailPublishSuccessCalls() []struct{ ... }
- func (mock *LoggerMock) ServerHandleMessageExpired(in1 *pipe.Pipe, in2 *providers.Message)
- func (mock *LoggerMock) ServerHandleMessageExpiredCalls() []struct{ ... }
- func (mock *LoggerMock) ServerNewMessageReceivedStart(in1 *pipe.Pipe, in2 *providers.Message) *LoggerTiming
- func (mock *LoggerMock) ServerNewMessageReceivedStartCalls() []struct{ ... }
- func (mock *LoggerMock) ServerNoPipesConfigured(in1 providers.Provider)
- func (mock *LoggerMock) ServerNoPipesConfiguredCalls() []struct{ ... }
- func (mock *LoggerMock) ServerSuccessPublish(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
- func (mock *LoggerMock) ServerSuccessPublishCalls() []struct{ ... }
- func (mock *LoggerMock) ServerSuccessPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error)
- func (mock *LoggerMock) ServerSuccessPublishFailedCalls() []struct{ ... }
- func (mock *LoggerMock) ServerSuccessPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
- func (mock *LoggerMock) ServerSuccessPublishSuccessCalls() []struct{ ... }
- func (mock *LoggerMock) ServerTemplateProcessFail(in1 *pipe.Action, in2 []byte, in3 error)
- func (mock *LoggerMock) ServerTemplateProcessFailCalls() []struct{ ... }
- func (mock *LoggerMock) ServerTemplateProcessStart(in1 *pipe.Action, in2 []byte) *LoggerTiming
- func (mock *LoggerMock) ServerTemplateProcessStartCalls() []struct{ ... }
- func (mock *LoggerMock) ServerTemplateProcessSuccess(in1 *pipe.Action, in2 []byte)
- func (mock *LoggerMock) ServerTemplateProcessSuccessCalls() []struct{ ... }
- func (mock *LoggerMock) ServerUnableToListen(in1 providers.Provider, in2 error)
- func (mock *LoggerMock) ServerUnableToListenCalls() []struct{ ... }
- type LoggerTiming
- type ProviderLogger
- type ServerLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { GetLogger() hclog.Logger GetStatsD() *statsd.Client ServerLogger ProviderLogger }
Logger proposes a standard interface for provider logging and metrics
type LoggerImpl ¶
type LoggerImpl struct {
// contains filtered or unexported fields
}
LoggerImpl is a concrete implementation of the Logger interface
func (*LoggerImpl) GetLogger ¶
func (l *LoggerImpl) GetLogger() hclog.Logger
GetLogger returns the assigned logger
func (*LoggerImpl) GetStatsD ¶
func (l *LoggerImpl) GetStatsD() *statsd.Client
GetStatsD returns the assigned statsd client
func (*LoggerImpl) ProviderConnectionCreated ¶
func (l *LoggerImpl) ProviderConnectionCreated(p providers.Provider)
func (*LoggerImpl) ProviderConnectionFailed ¶
func (l *LoggerImpl) ProviderConnectionFailed(p providers.Provider, err error)
func (*LoggerImpl) ProviderMessagePublished ¶
func (l *LoggerImpl) ProviderMessagePublished(p providers.Provider, m *providers.Message)
func (*LoggerImpl) ProviderSubcriptionCreated ¶
func (l *LoggerImpl) ProviderSubcriptionCreated(p providers.Provider)
func (*LoggerImpl) ProviderSubcriptionFailed ¶
func (l *LoggerImpl) ProviderSubcriptionFailed(p providers.Provider, err error)
func (*LoggerImpl) ServerActionPublish ¶
func (l *LoggerImpl) ServerActionPublish(pi *pipe.Pipe, m *providers.Message)
ServerActionPublish logs that a message has been published for a defined action
func (*LoggerImpl) ServerActionPublishFailed ¶
ServerActionPublishFailed logs that publishing a message to an action has failed
func (*LoggerImpl) ServerActionPublishSuccess ¶
func (l *LoggerImpl) ServerActionPublishSuccess(pi *pipe.Pipe, m *providers.Message)
ServerActionPublishSuccess logs that publishing a message was succcessful
func (*LoggerImpl) ServerFailPublish ¶
ServerFailPublish logs that a success message will be published
func (*LoggerImpl) ServerFailPublishFailed ¶
func (l *LoggerImpl) ServerFailPublishFailed(pi *pipe.Pipe, a *pipe.Action, m *providers.Message, err error)
ServerFailPublishFailed logs that the publishing of a success message has failed
func (*LoggerImpl) ServerFailPublishSuccess ¶
ServerFailPublishSuccess logs that the publishing of the success message has returned without error
func (*LoggerImpl) ServerHandleMessageExpired ¶
func (l *LoggerImpl) ServerHandleMessageExpired(pi *pipe.Pipe, m *providers.Message)
ServerHandleMessageExpired logs that a message has expired and will not be handled
func (*LoggerImpl) ServerNewMessageReceivedStart ¶
func (l *LoggerImpl) ServerNewMessageReceivedStart(pi *pipe.Pipe, m *providers.Message) *LoggerTiming
ServerNewMessageReceivedStart logs that a new message has been received, user should call the returned function Stop to ensure timing data is submitted to the logs i.e: defer p.logger.ServerStartNewMessageReceived(p, m).Stop()
func (*LoggerImpl) ServerNoPipesConfigured ¶
func (l *LoggerImpl) ServerNoPipesConfigured(p providers.Provider)
ServerNoPipesConfigured writes an error message to the log and statsd
func (*LoggerImpl) ServerSuccessPublish ¶
ServerSuccessPublish logs that a success message will be published
func (*LoggerImpl) ServerSuccessPublishFailed ¶
func (l *LoggerImpl) ServerSuccessPublishFailed(pi *pipe.Pipe, a *pipe.Action, m *providers.Message, err error)
ServerSuccessPublishFailed logs that the publishing of a success message has failed
func (*LoggerImpl) ServerSuccessPublishSuccess ¶
func (l *LoggerImpl) ServerSuccessPublishSuccess(pi *pipe.Pipe, a *pipe.Action, m *providers.Message)
ServerSuccessPublishSuccess logs that the publishing of the success message has returned without error
func (*LoggerImpl) ServerTemplateProcessFail ¶
func (l *LoggerImpl) ServerTemplateProcessFail(a *pipe.Action, data []byte, err error)
ServerTemplateProcessFail logs that a template has failed to process
func (*LoggerImpl) ServerTemplateProcessStart ¶
func (l *LoggerImpl) ServerTemplateProcessStart(a *pipe.Action, data []byte) *LoggerTiming
ServerTemplateProcess logs that the system will start processing a template, since this method times the execution of the process the user must called the returned Stop function e.g: defer p.logger.ServerTemplateProcessStart.Stop()
func (*LoggerImpl) ServerTemplateProcessSuccess ¶
func (l *LoggerImpl) ServerTemplateProcessSuccess(a *pipe.Action, data []byte)
ServerTemplateProcessSuccess logs that a template has processed successfully
func (*LoggerImpl) ServerUnableToListen ¶
func (l *LoggerImpl) ServerUnableToListen(p providers.Provider, err error)
ServerUnableToListen writes an error message to the log and statsd
type LoggerMock ¶
type LoggerMock struct { // GetLoggerFunc mocks the GetLogger method. GetLoggerFunc func() hclog.Logger // GetStatsDFunc mocks the GetStatsD method. GetStatsDFunc func() *statsd.Client // ProviderConnectionCreatedFunc mocks the ProviderConnectionCreated method. ProviderConnectionCreatedFunc func(in1 providers.Provider) // ProviderConnectionFailedFunc mocks the ProviderConnectionFailed method. ProviderConnectionFailedFunc func(in1 providers.Provider, in2 error) // ProviderMessagePublishedFunc mocks the ProviderMessagePublished method. ProviderMessagePublishedFunc func(in1 providers.Provider, in2 *providers.Message) // ProviderSubcriptionCreatedFunc mocks the ProviderSubcriptionCreated method. ProviderSubcriptionCreatedFunc func(in1 providers.Provider) // ProviderSubcriptionFailedFunc mocks the ProviderSubcriptionFailed method. ProviderSubcriptionFailedFunc func(in1 providers.Provider, in2 error) // ServerActionPublishFunc mocks the ServerActionPublish method. ServerActionPublishFunc func(in1 *pipe.Pipe, in2 *providers.Message) // ServerActionPublishFailedFunc mocks the ServerActionPublishFailed method. ServerActionPublishFailedFunc func(in1 *pipe.Pipe, in2 *providers.Message, in3 error) // ServerActionPublishSuccessFunc mocks the ServerActionPublishSuccess method. ServerActionPublishSuccessFunc func(in1 *pipe.Pipe, in2 *providers.Message) // ServerFailPublishFunc mocks the ServerFailPublish method. ServerFailPublishFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) // ServerFailPublishFailedFunc mocks the ServerFailPublishFailed method. ServerFailPublishFailedFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error) // ServerFailPublishSuccessFunc mocks the ServerFailPublishSuccess method. ServerFailPublishSuccessFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) // ServerHandleMessageExpiredFunc mocks the ServerHandleMessageExpired method. ServerHandleMessageExpiredFunc func(in1 *pipe.Pipe, in2 *providers.Message) // ServerNewMessageReceivedStartFunc mocks the ServerNewMessageReceivedStart method. ServerNewMessageReceivedStartFunc func(in1 *pipe.Pipe, in2 *providers.Message) *LoggerTiming // ServerNoPipesConfiguredFunc mocks the ServerNoPipesConfigured method. ServerNoPipesConfiguredFunc func(in1 providers.Provider) // ServerSuccessPublishFunc mocks the ServerSuccessPublish method. ServerSuccessPublishFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) // ServerSuccessPublishFailedFunc mocks the ServerSuccessPublishFailed method. ServerSuccessPublishFailedFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error) // ServerSuccessPublishSuccessFunc mocks the ServerSuccessPublishSuccess method. ServerSuccessPublishSuccessFunc func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) // ServerTemplateProcessFailFunc mocks the ServerTemplateProcessFail method. ServerTemplateProcessFailFunc func(in1 *pipe.Action, in2 []byte, in3 error) // ServerTemplateProcessStartFunc mocks the ServerTemplateProcessStart method. ServerTemplateProcessStartFunc func(in1 *pipe.Action, in2 []byte) *LoggerTiming // ServerTemplateProcessSuccessFunc mocks the ServerTemplateProcessSuccess method. ServerTemplateProcessSuccessFunc func(in1 *pipe.Action, in2 []byte) // ServerUnableToListenFunc mocks the ServerUnableToListen method. ServerUnableToListenFunc func(in1 providers.Provider, in2 error) // contains filtered or unexported fields }
LoggerMock is a mock implementation of Logger.
func TestSomethingThatUsesLogger(t *testing.T) { // make and configure a mocked Logger mockedLogger := &LoggerMock{ GetLoggerFunc: func() hclog.Logger { panic("TODO: mock out the GetLogger method") }, GetStatsDFunc: func() *statsd.Client { panic("TODO: mock out the GetStatsD method") }, ProviderConnectionCreatedFunc: func(in1 providers.Provider) { panic("TODO: mock out the ProviderConnectionCreated method") }, ProviderConnectionFailedFunc: func(in1 providers.Provider, in2 error) { panic("TODO: mock out the ProviderConnectionFailed method") }, ProviderMessagePublishedFunc: func(in1 providers.Provider, in2 *providers.Message) { panic("TODO: mock out the ProviderMessagePublished method") }, ProviderSubcriptionCreatedFunc: func(in1 providers.Provider) { panic("TODO: mock out the ProviderSubcriptionCreated method") }, ProviderSubcriptionFailedFunc: func(in1 providers.Provider, in2 error) { panic("TODO: mock out the ProviderSubcriptionFailed method") }, ServerActionPublishFunc: func(in1 *pipe.Pipe, in2 *providers.Message) { panic("TODO: mock out the ServerActionPublish method") }, ServerActionPublishFailedFunc: func(in1 *pipe.Pipe, in2 *providers.Message, in3 error) { panic("TODO: mock out the ServerActionPublishFailed method") }, ServerActionPublishSuccessFunc: func(in1 *pipe.Pipe, in2 *providers.Message) { panic("TODO: mock out the ServerActionPublishSuccess method") }, ServerFailPublishFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) { panic("TODO: mock out the ServerFailPublish method") }, ServerFailPublishFailedFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error) { panic("TODO: mock out the ServerFailPublishFailed method") }, ServerFailPublishSuccessFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) { panic("TODO: mock out the ServerFailPublishSuccess method") }, ServerHandleMessageExpiredFunc: func(in1 *pipe.Pipe, in2 *providers.Message) { panic("TODO: mock out the ServerHandleMessageExpired method") }, ServerNewMessageReceivedStartFunc: func(in1 *pipe.Pipe, in2 *providers.Message) *LoggerTiming { panic("TODO: mock out the ServerNewMessageReceivedStart method") }, ServerNoPipesConfiguredFunc: func(in1 providers.Provider) { panic("TODO: mock out the ServerNoPipesConfigured method") }, ServerSuccessPublishFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) { panic("TODO: mock out the ServerSuccessPublish method") }, ServerSuccessPublishFailedFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error) { panic("TODO: mock out the ServerSuccessPublishFailed method") }, ServerSuccessPublishSuccessFunc: func(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message) { panic("TODO: mock out the ServerSuccessPublishSuccess method") }, ServerTemplateProcessFailFunc: func(in1 *pipe.Action, in2 []byte, in3 error) { panic("TODO: mock out the ServerTemplateProcessFail method") }, ServerTemplateProcessStartFunc: func(in1 *pipe.Action, in2 []byte) *LoggerTiming { panic("TODO: mock out the ServerTemplateProcessStart method") }, ServerTemplateProcessSuccessFunc: func(in1 *pipe.Action, in2 []byte) { panic("TODO: mock out the ServerTemplateProcessSuccess method") }, ServerUnableToListenFunc: func(in1 providers.Provider, in2 error) { panic("TODO: mock out the ServerUnableToListen method") }, } // TODO: use mockedLogger in code that requires Logger // and then make assertions. }
func (*LoggerMock) GetLogger ¶
func (mock *LoggerMock) GetLogger() hclog.Logger
GetLogger calls GetLoggerFunc.
func (*LoggerMock) GetLoggerCalls ¶
func (mock *LoggerMock) GetLoggerCalls() []struct { }
GetLoggerCalls gets all the calls that were made to GetLogger. Check the length with:
len(mockedLogger.GetLoggerCalls())
func (*LoggerMock) GetStatsD ¶
func (mock *LoggerMock) GetStatsD() *statsd.Client
GetStatsD calls GetStatsDFunc.
func (*LoggerMock) GetStatsDCalls ¶
func (mock *LoggerMock) GetStatsDCalls() []struct { }
GetStatsDCalls gets all the calls that were made to GetStatsD. Check the length with:
len(mockedLogger.GetStatsDCalls())
func (*LoggerMock) ProviderConnectionCreated ¶
func (mock *LoggerMock) ProviderConnectionCreated(in1 providers.Provider)
ProviderConnectionCreated calls ProviderConnectionCreatedFunc.
func (*LoggerMock) ProviderConnectionCreatedCalls ¶
func (mock *LoggerMock) ProviderConnectionCreatedCalls() []struct { In1 providers.Provider }
ProviderConnectionCreatedCalls gets all the calls that were made to ProviderConnectionCreated. Check the length with:
len(mockedLogger.ProviderConnectionCreatedCalls())
func (*LoggerMock) ProviderConnectionFailed ¶
func (mock *LoggerMock) ProviderConnectionFailed(in1 providers.Provider, in2 error)
ProviderConnectionFailed calls ProviderConnectionFailedFunc.
func (*LoggerMock) ProviderConnectionFailedCalls ¶
func (mock *LoggerMock) ProviderConnectionFailedCalls() []struct { In1 providers.Provider In2 error }
ProviderConnectionFailedCalls gets all the calls that were made to ProviderConnectionFailed. Check the length with:
len(mockedLogger.ProviderConnectionFailedCalls())
func (*LoggerMock) ProviderMessagePublished ¶
func (mock *LoggerMock) ProviderMessagePublished(in1 providers.Provider, in2 *providers.Message)
ProviderMessagePublished calls ProviderMessagePublishedFunc.
func (*LoggerMock) ProviderMessagePublishedCalls ¶
func (mock *LoggerMock) ProviderMessagePublishedCalls() []struct { In1 providers.Provider In2 *providers.Message }
ProviderMessagePublishedCalls gets all the calls that were made to ProviderMessagePublished. Check the length with:
len(mockedLogger.ProviderMessagePublishedCalls())
func (*LoggerMock) ProviderSubcriptionCreated ¶
func (mock *LoggerMock) ProviderSubcriptionCreated(in1 providers.Provider)
ProviderSubcriptionCreated calls ProviderSubcriptionCreatedFunc.
func (*LoggerMock) ProviderSubcriptionCreatedCalls ¶
func (mock *LoggerMock) ProviderSubcriptionCreatedCalls() []struct { In1 providers.Provider }
ProviderSubcriptionCreatedCalls gets all the calls that were made to ProviderSubcriptionCreated. Check the length with:
len(mockedLogger.ProviderSubcriptionCreatedCalls())
func (*LoggerMock) ProviderSubcriptionFailed ¶
func (mock *LoggerMock) ProviderSubcriptionFailed(in1 providers.Provider, in2 error)
ProviderSubcriptionFailed calls ProviderSubcriptionFailedFunc.
func (*LoggerMock) ProviderSubcriptionFailedCalls ¶
func (mock *LoggerMock) ProviderSubcriptionFailedCalls() []struct { In1 providers.Provider In2 error }
ProviderSubcriptionFailedCalls gets all the calls that were made to ProviderSubcriptionFailed. Check the length with:
len(mockedLogger.ProviderSubcriptionFailedCalls())
func (*LoggerMock) ServerActionPublish ¶
func (mock *LoggerMock) ServerActionPublish(in1 *pipe.Pipe, in2 *providers.Message)
ServerActionPublish calls ServerActionPublishFunc.
func (*LoggerMock) ServerActionPublishCalls ¶
func (mock *LoggerMock) ServerActionPublishCalls() []struct { In1 *pipe.Pipe In2 *providers.Message }
ServerActionPublishCalls gets all the calls that were made to ServerActionPublish. Check the length with:
len(mockedLogger.ServerActionPublishCalls())
func (*LoggerMock) ServerActionPublishFailed ¶
func (mock *LoggerMock) ServerActionPublishFailed(in1 *pipe.Pipe, in2 *providers.Message, in3 error)
ServerActionPublishFailed calls ServerActionPublishFailedFunc.
func (*LoggerMock) ServerActionPublishFailedCalls ¶
func (mock *LoggerMock) ServerActionPublishFailedCalls() []struct { In1 *pipe.Pipe In2 *providers.Message In3 error }
ServerActionPublishFailedCalls gets all the calls that were made to ServerActionPublishFailed. Check the length with:
len(mockedLogger.ServerActionPublishFailedCalls())
func (*LoggerMock) ServerActionPublishSuccess ¶
func (mock *LoggerMock) ServerActionPublishSuccess(in1 *pipe.Pipe, in2 *providers.Message)
ServerActionPublishSuccess calls ServerActionPublishSuccessFunc.
func (*LoggerMock) ServerActionPublishSuccessCalls ¶
func (mock *LoggerMock) ServerActionPublishSuccessCalls() []struct { In1 *pipe.Pipe In2 *providers.Message }
ServerActionPublishSuccessCalls gets all the calls that were made to ServerActionPublishSuccess. Check the length with:
len(mockedLogger.ServerActionPublishSuccessCalls())
func (*LoggerMock) ServerFailPublish ¶
ServerFailPublish calls ServerFailPublishFunc.
func (*LoggerMock) ServerFailPublishCalls ¶
func (mock *LoggerMock) ServerFailPublishCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message }
ServerFailPublishCalls gets all the calls that were made to ServerFailPublish. Check the length with:
len(mockedLogger.ServerFailPublishCalls())
func (*LoggerMock) ServerFailPublishFailed ¶
func (mock *LoggerMock) ServerFailPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error)
ServerFailPublishFailed calls ServerFailPublishFailedFunc.
func (*LoggerMock) ServerFailPublishFailedCalls ¶
func (mock *LoggerMock) ServerFailPublishFailedCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message In4 error }
ServerFailPublishFailedCalls gets all the calls that were made to ServerFailPublishFailed. Check the length with:
len(mockedLogger.ServerFailPublishFailedCalls())
func (*LoggerMock) ServerFailPublishSuccess ¶
func (mock *LoggerMock) ServerFailPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
ServerFailPublishSuccess calls ServerFailPublishSuccessFunc.
func (*LoggerMock) ServerFailPublishSuccessCalls ¶
func (mock *LoggerMock) ServerFailPublishSuccessCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message }
ServerFailPublishSuccessCalls gets all the calls that were made to ServerFailPublishSuccess. Check the length with:
len(mockedLogger.ServerFailPublishSuccessCalls())
func (*LoggerMock) ServerHandleMessageExpired ¶
func (mock *LoggerMock) ServerHandleMessageExpired(in1 *pipe.Pipe, in2 *providers.Message)
ServerHandleMessageExpired calls ServerHandleMessageExpiredFunc.
func (*LoggerMock) ServerHandleMessageExpiredCalls ¶
func (mock *LoggerMock) ServerHandleMessageExpiredCalls() []struct { In1 *pipe.Pipe In2 *providers.Message }
ServerHandleMessageExpiredCalls gets all the calls that were made to ServerHandleMessageExpired. Check the length with:
len(mockedLogger.ServerHandleMessageExpiredCalls())
func (*LoggerMock) ServerNewMessageReceivedStart ¶
func (mock *LoggerMock) ServerNewMessageReceivedStart(in1 *pipe.Pipe, in2 *providers.Message) *LoggerTiming
ServerNewMessageReceivedStart calls ServerNewMessageReceivedStartFunc.
func (*LoggerMock) ServerNewMessageReceivedStartCalls ¶
func (mock *LoggerMock) ServerNewMessageReceivedStartCalls() []struct { In1 *pipe.Pipe In2 *providers.Message }
ServerNewMessageReceivedStartCalls gets all the calls that were made to ServerNewMessageReceivedStart. Check the length with:
len(mockedLogger.ServerNewMessageReceivedStartCalls())
func (*LoggerMock) ServerNoPipesConfigured ¶
func (mock *LoggerMock) ServerNoPipesConfigured(in1 providers.Provider)
ServerNoPipesConfigured calls ServerNoPipesConfiguredFunc.
func (*LoggerMock) ServerNoPipesConfiguredCalls ¶
func (mock *LoggerMock) ServerNoPipesConfiguredCalls() []struct { In1 providers.Provider }
ServerNoPipesConfiguredCalls gets all the calls that were made to ServerNoPipesConfigured. Check the length with:
len(mockedLogger.ServerNoPipesConfiguredCalls())
func (*LoggerMock) ServerSuccessPublish ¶
func (mock *LoggerMock) ServerSuccessPublish(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
ServerSuccessPublish calls ServerSuccessPublishFunc.
func (*LoggerMock) ServerSuccessPublishCalls ¶
func (mock *LoggerMock) ServerSuccessPublishCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message }
ServerSuccessPublishCalls gets all the calls that were made to ServerSuccessPublish. Check the length with:
len(mockedLogger.ServerSuccessPublishCalls())
func (*LoggerMock) ServerSuccessPublishFailed ¶
func (mock *LoggerMock) ServerSuccessPublishFailed(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message, in4 error)
ServerSuccessPublishFailed calls ServerSuccessPublishFailedFunc.
func (*LoggerMock) ServerSuccessPublishFailedCalls ¶
func (mock *LoggerMock) ServerSuccessPublishFailedCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message In4 error }
ServerSuccessPublishFailedCalls gets all the calls that were made to ServerSuccessPublishFailed. Check the length with:
len(mockedLogger.ServerSuccessPublishFailedCalls())
func (*LoggerMock) ServerSuccessPublishSuccess ¶
func (mock *LoggerMock) ServerSuccessPublishSuccess(in1 *pipe.Pipe, in2 *pipe.Action, in3 *providers.Message)
ServerSuccessPublishSuccess calls ServerSuccessPublishSuccessFunc.
func (*LoggerMock) ServerSuccessPublishSuccessCalls ¶
func (mock *LoggerMock) ServerSuccessPublishSuccessCalls() []struct { In1 *pipe.Pipe In2 *pipe.Action In3 *providers.Message }
ServerSuccessPublishSuccessCalls gets all the calls that were made to ServerSuccessPublishSuccess. Check the length with:
len(mockedLogger.ServerSuccessPublishSuccessCalls())
func (*LoggerMock) ServerTemplateProcessFail ¶
func (mock *LoggerMock) ServerTemplateProcessFail(in1 *pipe.Action, in2 []byte, in3 error)
ServerTemplateProcessFail calls ServerTemplateProcessFailFunc.
func (*LoggerMock) ServerTemplateProcessFailCalls ¶
func (mock *LoggerMock) ServerTemplateProcessFailCalls() []struct { In1 *pipe.Action In2 []byte In3 error }
ServerTemplateProcessFailCalls gets all the calls that were made to ServerTemplateProcessFail. Check the length with:
len(mockedLogger.ServerTemplateProcessFailCalls())
func (*LoggerMock) ServerTemplateProcessStart ¶
func (mock *LoggerMock) ServerTemplateProcessStart(in1 *pipe.Action, in2 []byte) *LoggerTiming
ServerTemplateProcessStart calls ServerTemplateProcessStartFunc.
func (*LoggerMock) ServerTemplateProcessStartCalls ¶
func (mock *LoggerMock) ServerTemplateProcessStartCalls() []struct { In1 *pipe.Action In2 []byte }
ServerTemplateProcessStartCalls gets all the calls that were made to ServerTemplateProcessStart. Check the length with:
len(mockedLogger.ServerTemplateProcessStartCalls())
func (*LoggerMock) ServerTemplateProcessSuccess ¶
func (mock *LoggerMock) ServerTemplateProcessSuccess(in1 *pipe.Action, in2 []byte)
ServerTemplateProcessSuccess calls ServerTemplateProcessSuccessFunc.
func (*LoggerMock) ServerTemplateProcessSuccessCalls ¶
func (mock *LoggerMock) ServerTemplateProcessSuccessCalls() []struct { In1 *pipe.Action In2 []byte }
ServerTemplateProcessSuccessCalls gets all the calls that were made to ServerTemplateProcessSuccess. Check the length with:
len(mockedLogger.ServerTemplateProcessSuccessCalls())
func (*LoggerMock) ServerUnableToListen ¶
func (mock *LoggerMock) ServerUnableToListen(in1 providers.Provider, in2 error)
ServerUnableToListen calls ServerUnableToListenFunc.
func (*LoggerMock) ServerUnableToListenCalls ¶
func (mock *LoggerMock) ServerUnableToListenCalls() []struct { In1 providers.Provider In2 error }
ServerUnableToListenCalls gets all the calls that were made to ServerUnableToListen. Check the length with:
len(mockedLogger.ServerUnableToListenCalls())
type LoggerTiming ¶
type LoggerTiming struct {
Stop func()
}
type ProviderLogger ¶
type ProviderLogger interface { ProviderConnectionFailed(providers.Provider, error) ProviderConnectionCreated(providers.Provider) ProviderSubcriptionFailed(providers.Provider, error) ProviderSubcriptionCreated(providers.Provider) ProviderMessagePublished(providers.Provider, *providers.Message) }
ProviderLogger defines logging methods for a provider
type ServerLogger ¶
type ServerLogger interface { ServerUnableToListen(providers.Provider, error) ServerNoPipesConfigured(providers.Provider) ServerNewMessageReceivedStart(*pipe.Pipe, *providers.Message) *LoggerTiming ServerHandleMessageExpired(*pipe.Pipe, *providers.Message) ServerActionPublish(*pipe.Pipe, *providers.Message) ServerActionPublishFailed(*pipe.Pipe, *providers.Message, error) ServerActionPublishSuccess(*pipe.Pipe, *providers.Message) ServerSuccessPublish(*pipe.Pipe, *pipe.Action, *providers.Message) ServerSuccessPublishFailed(*pipe.Pipe, *pipe.Action, *providers.Message, error) ServerSuccessPublishSuccess(*pipe.Pipe, *pipe.Action, *providers.Message) ServerFailPublish(*pipe.Pipe, *pipe.Action, *providers.Message) ServerFailPublishFailed(*pipe.Pipe, *pipe.Action, *providers.Message, error) ServerFailPublishSuccess(*pipe.Pipe, *pipe.Action, *providers.Message) ServerTemplateProcessStart(*pipe.Action, []byte) *LoggerTiming ServerTemplateProcessFail(*pipe.Action, []byte, error) ServerTemplateProcessSuccess(*pipe.Action, []byte) }
ServerLogger defines the interface for logging methods for the server