Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckResult ¶
type HealthCheckResult struct { CreateDuration time.Duration DestroyDuration time.Duration Amount int }
HealthCheckResult stores the duration that was needed to create and destroy the keys
type HealthChecker ¶
type HealthChecker interface {
PerformCheck(ctx context.Context, amount int) (*HealthCheckResult, error)
}
HealthChecker is the interface for performing an amount of checks and returning the result
type KMIPRepository ¶
type KMIPRepository interface { Create(ctx context.Context) (string, error) Destroy(ctx context.Context, id string) error }
KMIPRepository is the interface for the KMIP repository The implementation should be able to create and destroy keys
type MockHealthChecker ¶
MockHealthChecker is an autogenerated mock type for the HealthChecker type
func NewMockHealthChecker ¶
func NewMockHealthChecker(t interface { mock.TestingT Cleanup(func()) }) *MockHealthChecker
NewMockHealthChecker creates a new instance of MockHealthChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockHealthChecker) PerformCheck ¶
func (_m *MockHealthChecker) PerformCheck(ctx context.Context, amount int) (*HealthCheckResult, error)
PerformCheck provides a mock function with given fields: ctx, amount
type MockKMIPRepository ¶
MockKMIPRepository is an autogenerated mock type for the KMIPRepository type
func NewMockKMIPRepository ¶
func NewMockKMIPRepository(t interface { mock.TestingT Cleanup(func()) }) *MockKMIPRepository
NewMockKMIPRepository creates a new instance of MockKMIPRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.