readiness

package
v0.0.0-...-938f4d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package readiness is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct {
	// Client is a controller-runtime client capable of querying k8s.
	Client client.Client
	// contains filtered or unexported fields
}

Impl is a concrete instance of the readiness engine.

func (*Impl) IsReady

func (impl *Impl) IsReady() (bool, error)

IsReady deals with the osd-cluster-ready Job. Sets:

  • impl.Ready: true if:
  • a previous check has already succeeded (a cluster can't become un-ready once it's ready);
  • an osd-cluster-ready Job has completed; or
  • the cluster is older than maxClusterAgeMinutes false otherwise.
  • impl.Result: If the caller's reconcile is otherwise successful, it should return the given Result.
  • impl.clusterCreationTime: If it is necessary to check the age of the cluster, this is set so we only have to query prometheus once.

func (*Impl) Result

func (impl *Impl) Result() reconcile.Result

type Interface

type Interface interface {
	IsReady() (bool, error)
	Result() reconcile.Result
	// contains filtered or unexported methods
}

Interface is the interface for the readiness engine.

type MockInterface

type MockInterface struct {
	// contains filtered or unexported fields
}

MockInterface is a mock of Interface interface.

func NewMockInterface

func NewMockInterface(ctrl *gomock.Controller) *MockInterface

NewMockInterface creates a new mock instance.

func (*MockInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInterface) IsReady

func (m *MockInterface) IsReady() (bool, error)

IsReady mocks base method.

func (*MockInterface) Result

func (m *MockInterface) Result() reconcile.Result

Result mocks base method.

type MockInterfaceMockRecorder

type MockInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockInterfaceMockRecorder is the mock recorder for MockInterface.

func (*MockInterfaceMockRecorder) IsReady

func (mr *MockInterfaceMockRecorder) IsReady() *gomock.Call

IsReady indicates an expected call of IsReady.

func (*MockInterfaceMockRecorder) Result

func (mr *MockInterfaceMockRecorder) Result() *gomock.Call

Result indicates an expected call of Result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL