Documentation
¶
Index ¶
- type FakeOpmsClient
- func (f *FakeOpmsClient) DequeueTask(ctx context.Context) (*types.Task, time.Duration, error)
- func (f *FakeOpmsClient) HealthCheck(ctx context.Context) (*opms.HealthCheckData, error)
- func (f *FakeOpmsClient) Heartbeat(_ context.Context, _ actionsclientpb.Client, _, _, _ string) error
- func (f *FakeOpmsClient) PublishFailure(_ context.Context, _ actionsclientpb.Client, _, _, _ string, ...) error
- func (f *FakeOpmsClient) PublishSuccess(_ context.Context, _ actionsclientpb.Client, _, _, _ string, _ interface{}, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeOpmsClient ¶
type FakeOpmsClient struct {
HealthCheckFn func(ctx context.Context) (*opms.HealthCheckData, error)
DequeueTaskFn func(ctx context.Context) (*types.Task, time.Duration, error)
}
FakeOpmsClient is a configurable opms.Client for use in runner unit tests. Set the function fields to override individual methods; unset fields return safe zero-value defaults.
func (*FakeOpmsClient) DequeueTask ¶
func (*FakeOpmsClient) HealthCheck ¶
func (f *FakeOpmsClient) HealthCheck(ctx context.Context) (*opms.HealthCheckData, error)
func (*FakeOpmsClient) Heartbeat ¶
func (f *FakeOpmsClient) Heartbeat(_ context.Context, _ actionsclientpb.Client, _, _, _ string) error
func (*FakeOpmsClient) PublishFailure ¶
func (f *FakeOpmsClient) PublishFailure(_ context.Context, _ actionsclientpb.Client, _, _, _ string, _ aperrorpb.ActionPlatformErrorCode, _, _ string) error
func (*FakeOpmsClient) PublishSuccess ¶
func (f *FakeOpmsClient) PublishSuccess(_ context.Context, _ actionsclientpb.Client, _, _, _ string, _ interface{}, _ string) error
Click to show internal directories.
Click to hide internal directories.