Documentation ¶
Index ¶
- type HTTPServerMock
- type HealthCheckerMock
- func (mock *HealthCheckerMock) AddCheck(name string, checker healthcheck.Checker) error
- func (mock *HealthCheckerMock) AddCheckCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Handler(w http.ResponseWriter, req *http.Request)
- func (mock *HealthCheckerMock) HandlerCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Start(ctx context.Context)
- func (mock *HealthCheckerMock) StartCalls() []struct{ ... }
- func (mock *HealthCheckerMock) Stop()
- func (mock *HealthCheckerMock) StopCalls() []struct{}
- type InitialiserMock
- func (mock *InitialiserMock) DoGetFilesService(ctx context.Context, cfg *config.Config) file.FilesService
- func (mock *InitialiserMock) DoGetFilesServiceCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
- func (mock *InitialiserMock) DoGetHTTPServerCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetHealthCheck(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error)
- func (mock *InitialiserMock) DoGetHealthCheckCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetImageAPIClient(cfg *config.Config) event.ImageAPIClient
- func (mock *InitialiserMock) DoGetImageAPIClientCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetKafkaFilePublishedConsumer(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error)
- func (mock *InitialiserMock) DoGetKafkaFilePublishedConsumerCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetKafkaImagePublishedConsumer(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error)
- func (mock *InitialiserMock) DoGetKafkaImagePublishedConsumerCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetS3Client(awsRegion string, bucketName string) (event.S3Writer, error)
- func (mock *InitialiserMock) DoGetS3ClientCalls() []struct{ ... }
- func (mock *InitialiserMock) DoGetS3ClientV2(awsRegion string, bucketName string) (file.S3ClientV2, error)
- func (mock *InitialiserMock) DoGetS3ClientV2Calls() []struct{ ... }
- func (mock *InitialiserMock) DoGetS3ClientWithSession(bucketName string, s *session.Session) event.S3Reader
- func (mock *InitialiserMock) DoGetS3ClientWithSessionCalls() []struct{ ... }
- type KafkaConsumerMock
- func (mock *KafkaConsumerMock) Channels() *kafka.ConsumerGroupChannels
- func (mock *KafkaConsumerMock) ChannelsCalls() []struct{}
- func (mock *KafkaConsumerMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (mock *KafkaConsumerMock) CheckerCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) Close(ctx context.Context) error
- func (mock *KafkaConsumerMock) CloseCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) Initialise(ctx context.Context) error
- func (mock *KafkaConsumerMock) InitialiseCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) IsInitialised() bool
- func (mock *KafkaConsumerMock) IsInitialisedCalls() []struct{}
- func (mock *KafkaConsumerMock) LogErrors(ctx context.Context)
- func (mock *KafkaConsumerMock) LogErrorsCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) OnHealthUpdate(status string)
- func (mock *KafkaConsumerMock) OnHealthUpdateCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) RegisterBatchHandler(ctx context.Context, batchHandler kafka.BatchHandler) error
- func (mock *KafkaConsumerMock) RegisterBatchHandlerCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) RegisterHandler(ctx context.Context, h kafka.Handler) error
- func (mock *KafkaConsumerMock) RegisterHandlerCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) Start() error
- func (mock *KafkaConsumerMock) StartCalls() []struct{}
- func (mock *KafkaConsumerMock) State() kafka.State
- func (mock *KafkaConsumerMock) StateCalls() []struct{}
- func (mock *KafkaConsumerMock) StateWait(state kafka.State)
- func (mock *KafkaConsumerMock) StateWaitCalls() []struct{ ... }
- func (mock *KafkaConsumerMock) Stop() error
- func (mock *KafkaConsumerMock) StopAndWait() error
- func (mock *KafkaConsumerMock) StopAndWaitCalls() []struct{}
- func (mock *KafkaConsumerMock) StopCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServerMock ¶
type HTTPServerMock struct { // ListenAndServeFunc mocks the ListenAndServe method. ListenAndServeFunc func() error // ShutdownFunc mocks the Shutdown method. ShutdownFunc func(ctx context.Context) error // contains filtered or unexported fields }
HTTPServerMock is a mock implementation of service.HTTPServer.
func TestSomethingThatUsesHTTPServer(t *testing.T) { // make and configure a mocked service.HTTPServer mockedHTTPServer := &HTTPServerMock{ ListenAndServeFunc: func() error { panic("mock out the ListenAndServe method") }, ShutdownFunc: func(ctx context.Context) error { panic("mock out the Shutdown method") }, } // use mockedHTTPServer in code that requires service.HTTPServer // and then make assertions. }
func (*HTTPServerMock) ListenAndServe ¶
func (mock *HTTPServerMock) ListenAndServe() error
ListenAndServe calls ListenAndServeFunc.
func (*HTTPServerMock) ListenAndServeCalls ¶
func (mock *HTTPServerMock) ListenAndServeCalls() []struct { }
ListenAndServeCalls gets all the calls that were made to ListenAndServe. Check the length with:
len(mockedHTTPServer.ListenAndServeCalls())
func (*HTTPServerMock) Shutdown ¶
func (mock *HTTPServerMock) Shutdown(ctx context.Context) error
Shutdown calls ShutdownFunc.
func (*HTTPServerMock) ShutdownCalls ¶
func (mock *HTTPServerMock) ShutdownCalls() []struct { Ctx context.Context }
ShutdownCalls gets all the calls that were made to Shutdown. Check the length with:
len(mockedHTTPServer.ShutdownCalls())
type HealthCheckerMock ¶
type HealthCheckerMock struct { // AddCheckFunc mocks the AddCheck method. AddCheckFunc func(name string, checker healthcheck.Checker) error // HandlerFunc mocks the Handler method. HandlerFunc func(w http.ResponseWriter, req *http.Request) // StartFunc mocks the Start method. StartFunc func(ctx context.Context) // StopFunc mocks the Stop method. StopFunc func() // contains filtered or unexported fields }
HealthCheckerMock is a mock implementation of service.HealthChecker.
func TestSomethingThatUsesHealthChecker(t *testing.T) { // make and configure a mocked service.HealthChecker mockedHealthChecker := &HealthCheckerMock{ AddCheckFunc: func(name string, checker healthcheck.Checker) error { panic("mock out the AddCheck method") }, HandlerFunc: func(w http.ResponseWriter, req *http.Request) { panic("mock out the Handler method") }, StartFunc: func(ctx context.Context) { panic("mock out the Start method") }, StopFunc: func() { panic("mock out the Stop method") }, } // use mockedHealthChecker in code that requires service.HealthChecker // and then make assertions. }
func (*HealthCheckerMock) AddCheck ¶
func (mock *HealthCheckerMock) AddCheck(name string, checker healthcheck.Checker) error
AddCheck calls AddCheckFunc.
func (*HealthCheckerMock) AddCheckCalls ¶
func (mock *HealthCheckerMock) AddCheckCalls() []struct { Name string Checker healthcheck.Checker }
AddCheckCalls gets all the calls that were made to AddCheck. Check the length with:
len(mockedHealthChecker.AddCheckCalls())
func (*HealthCheckerMock) Handler ¶
func (mock *HealthCheckerMock) Handler(w http.ResponseWriter, req *http.Request)
Handler calls HandlerFunc.
func (*HealthCheckerMock) HandlerCalls ¶
func (mock *HealthCheckerMock) HandlerCalls() []struct { W http.ResponseWriter Req *http.Request }
HandlerCalls gets all the calls that were made to Handler. Check the length with:
len(mockedHealthChecker.HandlerCalls())
func (*HealthCheckerMock) Start ¶
func (mock *HealthCheckerMock) Start(ctx context.Context)
Start calls StartFunc.
func (*HealthCheckerMock) StartCalls ¶
func (mock *HealthCheckerMock) StartCalls() []struct { Ctx context.Context }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedHealthChecker.StartCalls())
func (*HealthCheckerMock) StopCalls ¶
func (mock *HealthCheckerMock) StopCalls() []struct { }
StopCalls gets all the calls that were made to Stop. Check the length with:
len(mockedHealthChecker.StopCalls())
type InitialiserMock ¶
type InitialiserMock struct { // DoGetFilesServiceFunc mocks the DoGetFilesService method. DoGetFilesServiceFunc func(ctx context.Context, cfg *config.Config) file.FilesService // DoGetHTTPServerFunc mocks the DoGetHTTPServer method. DoGetHTTPServerFunc func(bindAddr string, router http.Handler) service.HTTPServer // DoGetHealthCheckFunc mocks the DoGetHealthCheck method. DoGetHealthCheckFunc func(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error) // DoGetImageAPIClientFunc mocks the DoGetImageAPIClient method. DoGetImageAPIClientFunc func(cfg *config.Config) event.ImageAPIClient // DoGetKafkaFilePublishedConsumerFunc mocks the DoGetKafkaFilePublishedConsumer method. DoGetKafkaFilePublishedConsumerFunc func(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error) // DoGetKafkaImagePublishedConsumerFunc mocks the DoGetKafkaImagePublishedConsumer method. DoGetKafkaImagePublishedConsumerFunc func(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error) // DoGetS3ClientFunc mocks the DoGetS3Client method. DoGetS3ClientFunc func(awsRegion string, bucketName string) (event.S3Writer, error) // DoGetS3ClientV2Func mocks the DoGetS3ClientV2 method. DoGetS3ClientV2Func func(awsRegion string, bucketName string) (file.S3ClientV2, error) // DoGetS3ClientWithSessionFunc mocks the DoGetS3ClientWithSession method. DoGetS3ClientWithSessionFunc func(bucketName string, s *session.Session) event.S3Reader // contains filtered or unexported fields }
InitialiserMock is a mock implementation of service.Initialiser.
func TestSomethingThatUsesInitialiser(t *testing.T) { // make and configure a mocked service.Initialiser mockedInitialiser := &InitialiserMock{ DoGetFilesServiceFunc: func(ctx context.Context, cfg *config.Config) file.FilesService { panic("mock out the DoGetFilesService method") }, DoGetHTTPServerFunc: func(bindAddr string, router http.Handler) service.HTTPServer { panic("mock out the DoGetHTTPServer method") }, DoGetHealthCheckFunc: func(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error) { panic("mock out the DoGetHealthCheck method") }, DoGetImageAPIClientFunc: func(cfg *config.Config) event.ImageAPIClient { panic("mock out the DoGetImageAPIClient method") }, DoGetKafkaFilePublishedConsumerFunc: func(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error) { panic("mock out the DoGetKafkaFilePublishedConsumer method") }, DoGetKafkaImagePublishedConsumerFunc: func(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error) { panic("mock out the DoGetKafkaImagePublishedConsumer method") }, DoGetS3ClientFunc: func(awsRegion string, bucketName string) (event.S3Writer, error) { panic("mock out the DoGetS3Client method") }, DoGetS3ClientV2Func: func(awsRegion string, bucketName string) (file.S3ClientV2, error) { panic("mock out the DoGetS3ClientV2 method") }, DoGetS3ClientWithSessionFunc: func(bucketName string, s *session.Session) event.S3Reader { panic("mock out the DoGetS3ClientWithSession method") }, } // use mockedInitialiser in code that requires service.Initialiser // and then make assertions. }
func (*InitialiserMock) DoGetFilesService ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetFilesService(ctx context.Context, cfg *config.Config) file.FilesService
DoGetFilesService calls DoGetFilesServiceFunc.
func (*InitialiserMock) DoGetFilesServiceCalls ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetFilesServiceCalls() []struct { Ctx context.Context Cfg *config.Config }
DoGetFilesServiceCalls gets all the calls that were made to DoGetFilesService. Check the length with:
len(mockedInitialiser.DoGetFilesServiceCalls())
func (*InitialiserMock) DoGetHTTPServer ¶
func (mock *InitialiserMock) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
DoGetHTTPServer calls DoGetHTTPServerFunc.
func (*InitialiserMock) DoGetHTTPServerCalls ¶
func (mock *InitialiserMock) DoGetHTTPServerCalls() []struct { BindAddr string Router http.Handler }
DoGetHTTPServerCalls gets all the calls that were made to DoGetHTTPServer. Check the length with:
len(mockedInitialiser.DoGetHTTPServerCalls())
func (*InitialiserMock) DoGetHealthCheck ¶
func (mock *InitialiserMock) DoGetHealthCheck(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error)
DoGetHealthCheck calls DoGetHealthCheckFunc.
func (*InitialiserMock) DoGetHealthCheckCalls ¶
func (mock *InitialiserMock) DoGetHealthCheckCalls() []struct { Cfg *config.Config BuildTime string GitCommit string Version string }
DoGetHealthCheckCalls gets all the calls that were made to DoGetHealthCheck. Check the length with:
len(mockedInitialiser.DoGetHealthCheckCalls())
func (*InitialiserMock) DoGetImageAPIClient ¶ added in v0.3.0
func (mock *InitialiserMock) DoGetImageAPIClient(cfg *config.Config) event.ImageAPIClient
DoGetImageAPIClient calls DoGetImageAPIClientFunc.
func (*InitialiserMock) DoGetImageAPIClientCalls ¶ added in v0.3.0
func (mock *InitialiserMock) DoGetImageAPIClientCalls() []struct { Cfg *config.Config }
DoGetImageAPIClientCalls gets all the calls that were made to DoGetImageAPIClient. Check the length with:
len(mockedInitialiser.DoGetImageAPIClientCalls())
func (*InitialiserMock) DoGetKafkaFilePublishedConsumer ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetKafkaFilePublishedConsumer(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error)
DoGetKafkaFilePublishedConsumer calls DoGetKafkaFilePublishedConsumerFunc.
func (*InitialiserMock) DoGetKafkaFilePublishedConsumerCalls ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetKafkaFilePublishedConsumerCalls() []struct { Ctx context.Context Cfg *config.Config }
DoGetKafkaFilePublishedConsumerCalls gets all the calls that were made to DoGetKafkaFilePublishedConsumer. Check the length with:
len(mockedInitialiser.DoGetKafkaFilePublishedConsumerCalls())
func (*InitialiserMock) DoGetKafkaImagePublishedConsumer ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetKafkaImagePublishedConsumer(ctx context.Context, cfg *config.Config) (service.KafkaConsumer, error)
DoGetKafkaImagePublishedConsumer calls DoGetKafkaImagePublishedConsumerFunc.
func (*InitialiserMock) DoGetKafkaImagePublishedConsumerCalls ¶ added in v1.3.0
func (mock *InitialiserMock) DoGetKafkaImagePublishedConsumerCalls() []struct { Ctx context.Context Cfg *config.Config }
DoGetKafkaImagePublishedConsumerCalls gets all the calls that were made to DoGetKafkaImagePublishedConsumer. Check the length with:
len(mockedInitialiser.DoGetKafkaImagePublishedConsumerCalls())
func (*InitialiserMock) DoGetS3Client ¶ added in v0.4.0
func (mock *InitialiserMock) DoGetS3Client(awsRegion string, bucketName string) (event.S3Writer, error)
DoGetS3Client calls DoGetS3ClientFunc.
func (*InitialiserMock) DoGetS3ClientCalls ¶ added in v0.4.0
func (mock *InitialiserMock) DoGetS3ClientCalls() []struct { AwsRegion string BucketName string }
DoGetS3ClientCalls gets all the calls that were made to DoGetS3Client. Check the length with:
len(mockedInitialiser.DoGetS3ClientCalls())
func (*InitialiserMock) DoGetS3ClientV2 ¶ added in v1.2.0
func (mock *InitialiserMock) DoGetS3ClientV2(awsRegion string, bucketName string) (file.S3ClientV2, error)
DoGetS3ClientV2 calls DoGetS3ClientV2Func.
func (*InitialiserMock) DoGetS3ClientV2Calls ¶ added in v1.2.0
func (mock *InitialiserMock) DoGetS3ClientV2Calls() []struct { AwsRegion string BucketName string }
DoGetS3ClientV2Calls gets all the calls that were made to DoGetS3ClientV2. Check the length with:
len(mockedInitialiser.DoGetS3ClientV2Calls())
func (*InitialiserMock) DoGetS3ClientWithSession ¶ added in v0.7.0
func (mock *InitialiserMock) DoGetS3ClientWithSession(bucketName string, s *session.Session) event.S3Reader
DoGetS3ClientWithSession calls DoGetS3ClientWithSessionFunc.
func (*InitialiserMock) DoGetS3ClientWithSessionCalls ¶ added in v0.7.0
func (mock *InitialiserMock) DoGetS3ClientWithSessionCalls() []struct { BucketName string S *session.Session }
DoGetS3ClientWithSessionCalls gets all the calls that were made to DoGetS3ClientWithSession. Check the length with:
len(mockedInitialiser.DoGetS3ClientWithSessionCalls())
type KafkaConsumerMock ¶ added in v0.7.0
type KafkaConsumerMock struct { // ChannelsFunc mocks the Channels method. ChannelsFunc func() *kafka.ConsumerGroupChannels // CheckerFunc mocks the Checker method. CheckerFunc func(ctx context.Context, state *healthcheck.CheckState) error // CloseFunc mocks the Close method. CloseFunc func(ctx context.Context) error // InitialiseFunc mocks the Initialise method. InitialiseFunc func(ctx context.Context) error // IsInitialisedFunc mocks the IsInitialised method. IsInitialisedFunc func() bool // LogErrorsFunc mocks the LogErrors method. LogErrorsFunc func(ctx context.Context) // OnHealthUpdateFunc mocks the OnHealthUpdate method. OnHealthUpdateFunc func(status string) // RegisterBatchHandlerFunc mocks the RegisterBatchHandler method. RegisterBatchHandlerFunc func(ctx context.Context, batchHandler kafka.BatchHandler) error // RegisterHandlerFunc mocks the RegisterHandler method. RegisterHandlerFunc func(ctx context.Context, h kafka.Handler) error // StartFunc mocks the Start method. StartFunc func() error // StateFunc mocks the State method. StateFunc func() kafka.State // StateWaitFunc mocks the StateWait method. StateWaitFunc func(state kafka.State) // StopFunc mocks the Stop method. StopFunc func() error // StopAndWaitFunc mocks the StopAndWait method. StopAndWaitFunc func() error // contains filtered or unexported fields }
KafkaConsumerMock is a mock implementation of service.KafkaConsumer.
func TestSomethingThatUsesKafkaConsumer(t *testing.T) { // make and configure a mocked service.KafkaConsumer mockedKafkaConsumer := &KafkaConsumerMock{ ChannelsFunc: func() *kafka.ConsumerGroupChannels { panic("mock out the Channels method") }, CheckerFunc: func(ctx context.Context, state *healthcheck.CheckState) error { panic("mock out the Checker method") }, CloseFunc: func(ctx context.Context) error { panic("mock out the Close method") }, InitialiseFunc: func(ctx context.Context) error { panic("mock out the Initialise method") }, IsInitialisedFunc: func() bool { panic("mock out the IsInitialised method") }, LogErrorsFunc: func(ctx context.Context) { panic("mock out the LogErrors method") }, OnHealthUpdateFunc: func(status string) { panic("mock out the OnHealthUpdate method") }, RegisterBatchHandlerFunc: func(ctx context.Context, batchHandler kafka.BatchHandler) error { panic("mock out the RegisterBatchHandler method") }, RegisterHandlerFunc: func(ctx context.Context, h kafka.Handler) error { panic("mock out the RegisterHandler method") }, StartFunc: func() error { panic("mock out the Start method") }, StateFunc: func() kafka.State { panic("mock out the State method") }, StateWaitFunc: func(state kafka.State) { panic("mock out the StateWait method") }, StopFunc: func() error { panic("mock out the Stop method") }, StopAndWaitFunc: func() error { panic("mock out the StopAndWait method") }, } // use mockedKafkaConsumer in code that requires service.KafkaConsumer // and then make assertions. }
func (*KafkaConsumerMock) Channels ¶ added in v0.7.0
func (mock *KafkaConsumerMock) Channels() *kafka.ConsumerGroupChannels
Channels calls ChannelsFunc.
func (*KafkaConsumerMock) ChannelsCalls ¶ added in v0.7.0
func (mock *KafkaConsumerMock) ChannelsCalls() []struct { }
ChannelsCalls gets all the calls that were made to Channels. Check the length with:
len(mockedKafkaConsumer.ChannelsCalls())
func (*KafkaConsumerMock) Checker ¶ added in v0.7.0
func (mock *KafkaConsumerMock) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*KafkaConsumerMock) CheckerCalls ¶ added in v0.7.0
func (mock *KafkaConsumerMock) CheckerCalls() []struct { Ctx context.Context State *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedKafkaConsumer.CheckerCalls())
func (*KafkaConsumerMock) Close ¶ added in v0.7.0
func (mock *KafkaConsumerMock) Close(ctx context.Context) error
Close calls CloseFunc.
func (*KafkaConsumerMock) CloseCalls ¶ added in v0.7.0
func (mock *KafkaConsumerMock) CloseCalls() []struct { Ctx context.Context }
CloseCalls gets all the calls that were made to Close. Check the length with:
len(mockedKafkaConsumer.CloseCalls())
func (*KafkaConsumerMock) Initialise ¶ added in v1.3.0
func (mock *KafkaConsumerMock) Initialise(ctx context.Context) error
Initialise calls InitialiseFunc.
func (*KafkaConsumerMock) InitialiseCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) InitialiseCalls() []struct { Ctx context.Context }
InitialiseCalls gets all the calls that were made to Initialise. Check the length with:
len(mockedKafkaConsumer.InitialiseCalls())
func (*KafkaConsumerMock) IsInitialised ¶ added in v1.3.0
func (mock *KafkaConsumerMock) IsInitialised() bool
IsInitialised calls IsInitialisedFunc.
func (*KafkaConsumerMock) IsInitialisedCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) IsInitialisedCalls() []struct { }
IsInitialisedCalls gets all the calls that were made to IsInitialised. Check the length with:
len(mockedKafkaConsumer.IsInitialisedCalls())
func (*KafkaConsumerMock) LogErrors ¶ added in v1.3.0
func (mock *KafkaConsumerMock) LogErrors(ctx context.Context)
LogErrors calls LogErrorsFunc.
func (*KafkaConsumerMock) LogErrorsCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) LogErrorsCalls() []struct { Ctx context.Context }
LogErrorsCalls gets all the calls that were made to LogErrors. Check the length with:
len(mockedKafkaConsumer.LogErrorsCalls())
func (*KafkaConsumerMock) OnHealthUpdate ¶ added in v1.3.0
func (mock *KafkaConsumerMock) OnHealthUpdate(status string)
OnHealthUpdate calls OnHealthUpdateFunc.
func (*KafkaConsumerMock) OnHealthUpdateCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) OnHealthUpdateCalls() []struct { Status string }
OnHealthUpdateCalls gets all the calls that were made to OnHealthUpdate. Check the length with:
len(mockedKafkaConsumer.OnHealthUpdateCalls())
func (*KafkaConsumerMock) RegisterBatchHandler ¶ added in v1.3.0
func (mock *KafkaConsumerMock) RegisterBatchHandler(ctx context.Context, batchHandler kafka.BatchHandler) error
RegisterBatchHandler calls RegisterBatchHandlerFunc.
func (*KafkaConsumerMock) RegisterBatchHandlerCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) RegisterBatchHandlerCalls() []struct { Ctx context.Context BatchHandler kafka.BatchHandler }
RegisterBatchHandlerCalls gets all the calls that were made to RegisterBatchHandler. Check the length with:
len(mockedKafkaConsumer.RegisterBatchHandlerCalls())
func (*KafkaConsumerMock) RegisterHandler ¶ added in v1.3.0
RegisterHandler calls RegisterHandlerFunc.
func (*KafkaConsumerMock) RegisterHandlerCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) RegisterHandlerCalls() []struct { Ctx context.Context H kafka.Handler }
RegisterHandlerCalls gets all the calls that were made to RegisterHandler. Check the length with:
len(mockedKafkaConsumer.RegisterHandlerCalls())
func (*KafkaConsumerMock) Start ¶ added in v1.3.0
func (mock *KafkaConsumerMock) Start() error
Start calls StartFunc.
func (*KafkaConsumerMock) StartCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StartCalls() []struct { }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedKafkaConsumer.StartCalls())
func (*KafkaConsumerMock) State ¶ added in v1.3.0
func (mock *KafkaConsumerMock) State() kafka.State
State calls StateFunc.
func (*KafkaConsumerMock) StateCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StateCalls() []struct { }
StateCalls gets all the calls that were made to State. Check the length with:
len(mockedKafkaConsumer.StateCalls())
func (*KafkaConsumerMock) StateWait ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StateWait(state kafka.State)
StateWait calls StateWaitFunc.
func (*KafkaConsumerMock) StateWaitCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StateWaitCalls() []struct { State kafka.State }
StateWaitCalls gets all the calls that were made to StateWait. Check the length with:
len(mockedKafkaConsumer.StateWaitCalls())
func (*KafkaConsumerMock) Stop ¶ added in v1.3.0
func (mock *KafkaConsumerMock) Stop() error
Stop calls StopFunc.
func (*KafkaConsumerMock) StopAndWait ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StopAndWait() error
StopAndWait calls StopAndWaitFunc.
func (*KafkaConsumerMock) StopAndWaitCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StopAndWaitCalls() []struct { }
StopAndWaitCalls gets all the calls that were made to StopAndWait. Check the length with:
len(mockedKafkaConsumer.StopAndWaitCalls())
func (*KafkaConsumerMock) StopCalls ¶ added in v1.3.0
func (mock *KafkaConsumerMock) StopCalls() []struct { }
StopCalls gets all the calls that were made to Stop. Check the length with:
len(mockedKafkaConsumer.StopCalls())