Documentation ¶
Overview ¶
Package cluster is a generated GoMock package.
Index ¶
- Constants
- func NewClusterStateMachine(th *transitionHandler) stateswitch.StateMachine
- func NewErrorState(log logrus.FieldLogger, db *gorm.DB) *errorState
- func NewFinalizingState(log logrus.FieldLogger, db *gorm.DB) *finalizingState
- func NewInstalledState(log logrus.FieldLogger, db *gorm.DB) *installedState
- func NewInstaller(log logrus.FieldLogger, db *gorm.DB) *installer
- func NewInstallingState(log logrus.FieldLogger, db *gorm.DB) *installingState
- func NewInsufficientState(log logrus.FieldLogger, db *gorm.DB, hostAPI host.API) *insufficientState
- func NewPrepareForInstallation(cfg PrepareConfig, log logrus.FieldLogger, db *gorm.DB) *prepare
- func NewReadyState(log logrus.FieldLogger, db *gorm.DB) *readyState
- func NewRegistrar(log logrus.FieldLogger, db *gorm.DB) *registrar
- func UpdateCluster(log logrus.FieldLogger, db *gorm.DB, clusterId strfmt.UUID, srcStatus string, ...) (*common.Cluster, error)
- type API
- type Config
- type InstallationAPI
- type Manager
- func (m *Manager) AcceptRegistration(c *common.Cluster) (err error)
- func (m *Manager) CancelInstallation(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
- func (m *Manager) ClusterMonitoring()
- func (m *Manager) CompleteInstallation(ctx context.Context, c *common.Cluster, successfullyFinished bool, ...) *common.ApiErrorResponse
- func (m *Manager) DeregisterCluster(ctx context.Context, c *common.Cluster) error
- func (m *Manager) DownloadFiles(c *common.Cluster) (err error)
- func (m *Manager) DownloadKubeconfig(c *common.Cluster) (err error)
- func (m *Manager) GetCredentials(c *common.Cluster) (err error)
- func (m *Manager) GetMasterNodesIds(ctx context.Context, c *common.Cluster, db *gorm.DB) ([]*strfmt.UUID, error)
- func (m *Manager) HandlePreInstallError(ctx context.Context, c *common.Cluster, installErr error)
- func (m *Manager) Install(ctx context.Context, c *common.Cluster, db *gorm.DB) error
- func (m *Manager) PrepareForInstallation(ctx context.Context, c *common.Cluster, db *gorm.DB) error
- func (m *Manager) RefreshStatus(ctx context.Context, c *common.Cluster, db *gorm.DB) (*common.Cluster, error)
- func (m *Manager) RegisterCluster(ctx context.Context, c *common.Cluster) error
- func (m *Manager) ResetCluster(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
- func (m *Manager) SetGeneratorVersion(c *common.Cluster, version string, db *gorm.DB) error
- func (m *Manager) UploadIngressCert(c *common.Cluster) (err error)
- func (m *Manager) VerifyClusterUpdatability(c *common.Cluster) (err error)
- type MockAPI
- func (m *MockAPI) AcceptRegistration(c *common.Cluster) error
- func (m *MockAPI) CancelInstallation(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
- func (m *MockAPI) ClusterMonitoring()
- func (m *MockAPI) CompleteInstallation(ctx context.Context, c *common.Cluster, successfullyFinished bool, ...) *common.ApiErrorResponse
- func (m *MockAPI) DeregisterCluster(ctx context.Context, c *common.Cluster) error
- func (m *MockAPI) DownloadFiles(c *common.Cluster) error
- func (m *MockAPI) DownloadKubeconfig(c *common.Cluster) error
- func (m *MockAPI) EXPECT() *MockAPIMockRecorder
- func (m *MockAPI) GetCredentials(c *common.Cluster) error
- func (m *MockAPI) GetMasterNodesIds(ctx context.Context, c *common.Cluster, db *gorm.DB) ([]*strfmt.UUID, error)
- func (m *MockAPI) HandlePreInstallError(ctx context.Context, c *common.Cluster, err error)
- func (m *MockAPI) Install(ctx context.Context, c *common.Cluster, db *gorm.DB) error
- func (m *MockAPI) PrepareForInstallation(ctx context.Context, c *common.Cluster, db *gorm.DB) error
- func (m *MockAPI) RefreshStatus(ctx context.Context, c *common.Cluster, db *gorm.DB) (*common.Cluster, error)
- func (m *MockAPI) RegisterCluster(ctx context.Context, c *common.Cluster) error
- func (m *MockAPI) ResetCluster(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
- func (m *MockAPI) SetGeneratorVersion(c *common.Cluster, version string, db *gorm.DB) error
- func (m *MockAPI) UploadIngressCert(c *common.Cluster) error
- func (m *MockAPI) VerifyClusterUpdatability(c *common.Cluster) error
- type MockAPIMockRecorder
- func (mr *MockAPIMockRecorder) AcceptRegistration(c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) CancelInstallation(ctx, c, reason, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) ClusterMonitoring() *gomock.Call
- func (mr *MockAPIMockRecorder) CompleteInstallation(ctx, c, successfullyFinished, reason interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) DeregisterCluster(ctx, c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) DownloadFiles(c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) DownloadKubeconfig(c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) GetCredentials(c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) GetMasterNodesIds(ctx, c, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) HandlePreInstallError(ctx, c, err interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) Install(ctx, c, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) PrepareForInstallation(ctx, c, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) RefreshStatus(ctx, c, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) RegisterCluster(ctx, c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) ResetCluster(ctx, c, reason, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) SetGeneratorVersion(c, version, db interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) UploadIngressCert(c interface{}) *gomock.Call
- func (mr *MockAPIMockRecorder) VerifyClusterUpdatability(c interface{}) *gomock.Call
- type MockInstallationAPI
- type MockInstallationAPIMockRecorder
- type MockRegistrationAPI
- type MockRegistrationAPIMockRecorder
- type MockStateAPI
- type MockStateAPIMockRecorder
- type PrepareConfig
- type RegistrationAPI
- type StateAPI
- type TransitionArgsCancelInstallation
- type TransitionArgsCompleteInstallation
- type TransitionArgsHandlePreInstallationError
- type TransitionArgsPrepareForInstallation
- type TransitionArgsResetCluster
Constants ¶
const ( TransitionTypeCancelInstallation = "CancelInstallation" TransitionTypeResetCluster = "ResetCluster" TransitionTypePrepareForInstallation = "PrepareForInstallation" TransitionTypeCompleteInstallation = "CompleteInstallation" TransitionTypeHandlePreInstallationError = "Handle pre-installation-error" )
Variables ¶
This section is empty.
Functions ¶
func NewClusterStateMachine ¶ added in v1.0.4
func NewClusterStateMachine(th *transitionHandler) stateswitch.StateMachine
func NewErrorState ¶
func NewErrorState(log logrus.FieldLogger, db *gorm.DB) *errorState
func NewFinalizingState ¶ added in v1.0.6
func NewFinalizingState(log logrus.FieldLogger, db *gorm.DB) *finalizingState
func NewInstalledState ¶
func NewInstalledState(log logrus.FieldLogger, db *gorm.DB) *installedState
func NewInstaller ¶
func NewInstaller(log logrus.FieldLogger, db *gorm.DB) *installer
func NewInstallingState ¶
func NewInstallingState(log logrus.FieldLogger, db *gorm.DB) *installingState
func NewInsufficientState ¶
func NewPrepareForInstallation ¶ added in v1.0.5
func NewPrepareForInstallation(cfg PrepareConfig, log logrus.FieldLogger, db *gorm.DB) *prepare
func NewReadyState ¶
func NewReadyState(log logrus.FieldLogger, db *gorm.DB) *readyState
func NewRegistrar ¶
func NewRegistrar(log logrus.FieldLogger, db *gorm.DB) *registrar
Types ¶
type API ¶
type API interface { StateAPI RegistrationAPI InstallationAPI ClusterMonitoring() DownloadFiles(c *common.Cluster) (err error) DownloadKubeconfig(c *common.Cluster) (err error) GetCredentials(c *common.Cluster) (err error) UploadIngressCert(c *common.Cluster) (err error) VerifyClusterUpdatability(c *common.Cluster) (err error) AcceptRegistration(c *common.Cluster) (err error) SetGeneratorVersion(c *common.Cluster, version string, db *gorm.DB) error CancelInstallation(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse ResetCluster(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse PrepareForInstallation(ctx context.Context, c *common.Cluster, db *gorm.DB) error HandlePreInstallError(ctx context.Context, c *common.Cluster, err error) CompleteInstallation(ctx context.Context, c *common.Cluster, successfullyFinished bool, reason string) *common.ApiErrorResponse }
type Config ¶ added in v1.0.5
type Config struct {
PrepareConfig PrepareConfig
}
type InstallationAPI ¶
type Manager ¶
type Manager struct { Config // contains filtered or unexported fields }
func NewManager ¶
func (*Manager) AcceptRegistration ¶
func (*Manager) CancelInstallation ¶ added in v1.0.4
func (*Manager) ClusterMonitoring ¶
func (m *Manager) ClusterMonitoring()
func (*Manager) CompleteInstallation ¶ added in v1.0.6
func (*Manager) DeregisterCluster ¶
func (*Manager) DownloadKubeconfig ¶
func (*Manager) GetMasterNodesIds ¶
func (*Manager) HandlePreInstallError ¶ added in v1.0.5
func (*Manager) PrepareForInstallation ¶ added in v1.0.5
func (*Manager) RefreshStatus ¶
func (*Manager) RegisterCluster ¶
func (*Manager) ResetCluster ¶ added in v1.0.4
func (*Manager) SetGeneratorVersion ¶ added in v1.0.1
func (*Manager) UploadIngressCert ¶
type MockAPI ¶
type MockAPI struct {
// contains filtered or unexported fields
}
MockAPI is a mock of API interface
func NewMockAPI ¶
func NewMockAPI(ctrl *gomock.Controller) *MockAPI
NewMockAPI creates a new mock instance
func (*MockAPI) AcceptRegistration ¶
AcceptRegistration mocks base method
func (*MockAPI) CancelInstallation ¶ added in v1.0.4
func (m *MockAPI) CancelInstallation(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
CancelInstallation mocks base method
func (*MockAPI) ClusterMonitoring ¶
func (m *MockAPI) ClusterMonitoring()
ClusterMonitoring mocks base method
func (*MockAPI) CompleteInstallation ¶ added in v1.0.6
func (m *MockAPI) CompleteInstallation(ctx context.Context, c *common.Cluster, successfullyFinished bool, reason string) *common.ApiErrorResponse
CompleteInstallation mocks base method
func (*MockAPI) DeregisterCluster ¶
DeregisterCluster mocks base method
func (*MockAPI) DownloadFiles ¶
DownloadFiles mocks base method
func (*MockAPI) DownloadKubeconfig ¶
DownloadKubeconfig mocks base method
func (*MockAPI) EXPECT ¶
func (m *MockAPI) EXPECT() *MockAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAPI) GetCredentials ¶
GetCredentials mocks base method
func (*MockAPI) GetMasterNodesIds ¶
func (m *MockAPI) GetMasterNodesIds(ctx context.Context, c *common.Cluster, db *gorm.DB) ([]*strfmt.UUID, error)
GetMasterNodesIds mocks base method
func (*MockAPI) HandlePreInstallError ¶ added in v1.0.5
HandlePreInstallError mocks base method
func (*MockAPI) PrepareForInstallation ¶ added in v1.0.5
PrepareForInstallation mocks base method
func (*MockAPI) RefreshStatus ¶
func (m *MockAPI) RefreshStatus(ctx context.Context, c *common.Cluster, db *gorm.DB) (*common.Cluster, error)
RefreshStatus mocks base method
func (*MockAPI) RegisterCluster ¶
RegisterCluster mocks base method
func (*MockAPI) ResetCluster ¶ added in v1.0.4
func (m *MockAPI) ResetCluster(ctx context.Context, c *common.Cluster, reason string, db *gorm.DB) *common.ApiErrorResponse
ResetCluster mocks base method
func (*MockAPI) SetGeneratorVersion ¶ added in v1.0.1
SetGeneratorVersion mocks base method
func (*MockAPI) UploadIngressCert ¶
UploadIngressCert mocks base method
type MockAPIMockRecorder ¶
type MockAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockAPIMockRecorder is the mock recorder for MockAPI
func (*MockAPIMockRecorder) AcceptRegistration ¶
func (mr *MockAPIMockRecorder) AcceptRegistration(c interface{}) *gomock.Call
AcceptRegistration indicates an expected call of AcceptRegistration
func (*MockAPIMockRecorder) CancelInstallation ¶ added in v1.0.4
func (mr *MockAPIMockRecorder) CancelInstallation(ctx, c, reason, db interface{}) *gomock.Call
CancelInstallation indicates an expected call of CancelInstallation
func (*MockAPIMockRecorder) ClusterMonitoring ¶
func (mr *MockAPIMockRecorder) ClusterMonitoring() *gomock.Call
ClusterMonitoring indicates an expected call of ClusterMonitoring
func (*MockAPIMockRecorder) CompleteInstallation ¶ added in v1.0.6
func (mr *MockAPIMockRecorder) CompleteInstallation(ctx, c, successfullyFinished, reason interface{}) *gomock.Call
CompleteInstallation indicates an expected call of CompleteInstallation
func (*MockAPIMockRecorder) DeregisterCluster ¶
func (mr *MockAPIMockRecorder) DeregisterCluster(ctx, c interface{}) *gomock.Call
DeregisterCluster indicates an expected call of DeregisterCluster
func (*MockAPIMockRecorder) DownloadFiles ¶
func (mr *MockAPIMockRecorder) DownloadFiles(c interface{}) *gomock.Call
DownloadFiles indicates an expected call of DownloadFiles
func (*MockAPIMockRecorder) DownloadKubeconfig ¶
func (mr *MockAPIMockRecorder) DownloadKubeconfig(c interface{}) *gomock.Call
DownloadKubeconfig indicates an expected call of DownloadKubeconfig
func (*MockAPIMockRecorder) GetCredentials ¶
func (mr *MockAPIMockRecorder) GetCredentials(c interface{}) *gomock.Call
GetCredentials indicates an expected call of GetCredentials
func (*MockAPIMockRecorder) GetMasterNodesIds ¶
func (mr *MockAPIMockRecorder) GetMasterNodesIds(ctx, c, db interface{}) *gomock.Call
GetMasterNodesIds indicates an expected call of GetMasterNodesIds
func (*MockAPIMockRecorder) HandlePreInstallError ¶ added in v1.0.5
func (mr *MockAPIMockRecorder) HandlePreInstallError(ctx, c, err interface{}) *gomock.Call
HandlePreInstallError indicates an expected call of HandlePreInstallError
func (*MockAPIMockRecorder) Install ¶
func (mr *MockAPIMockRecorder) Install(ctx, c, db interface{}) *gomock.Call
Install indicates an expected call of Install
func (*MockAPIMockRecorder) PrepareForInstallation ¶ added in v1.0.5
func (mr *MockAPIMockRecorder) PrepareForInstallation(ctx, c, db interface{}) *gomock.Call
PrepareForInstallation indicates an expected call of PrepareForInstallation
func (*MockAPIMockRecorder) RefreshStatus ¶
func (mr *MockAPIMockRecorder) RefreshStatus(ctx, c, db interface{}) *gomock.Call
RefreshStatus indicates an expected call of RefreshStatus
func (*MockAPIMockRecorder) RegisterCluster ¶
func (mr *MockAPIMockRecorder) RegisterCluster(ctx, c interface{}) *gomock.Call
RegisterCluster indicates an expected call of RegisterCluster
func (*MockAPIMockRecorder) ResetCluster ¶ added in v1.0.4
func (mr *MockAPIMockRecorder) ResetCluster(ctx, c, reason, db interface{}) *gomock.Call
ResetCluster indicates an expected call of ResetCluster
func (*MockAPIMockRecorder) SetGeneratorVersion ¶ added in v1.0.1
func (mr *MockAPIMockRecorder) SetGeneratorVersion(c, version, db interface{}) *gomock.Call
SetGeneratorVersion indicates an expected call of SetGeneratorVersion
func (*MockAPIMockRecorder) UploadIngressCert ¶
func (mr *MockAPIMockRecorder) UploadIngressCert(c interface{}) *gomock.Call
UploadIngressCert indicates an expected call of UploadIngressCert
func (*MockAPIMockRecorder) VerifyClusterUpdatability ¶
func (mr *MockAPIMockRecorder) VerifyClusterUpdatability(c interface{}) *gomock.Call
VerifyClusterUpdatability indicates an expected call of VerifyClusterUpdatability
type MockInstallationAPI ¶
type MockInstallationAPI struct {
// contains filtered or unexported fields
}
MockInstallationAPI is a mock of InstallationAPI interface
func NewMockInstallationAPI ¶
func NewMockInstallationAPI(ctrl *gomock.Controller) *MockInstallationAPI
NewMockInstallationAPI creates a new mock instance
func (*MockInstallationAPI) EXPECT ¶
func (m *MockInstallationAPI) EXPECT() *MockInstallationAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockInstallationAPIMockRecorder ¶
type MockInstallationAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockInstallationAPIMockRecorder is the mock recorder for MockInstallationAPI
func (*MockInstallationAPIMockRecorder) GetMasterNodesIds ¶
func (mr *MockInstallationAPIMockRecorder) GetMasterNodesIds(ctx, c, db interface{}) *gomock.Call
GetMasterNodesIds indicates an expected call of GetMasterNodesIds
func (*MockInstallationAPIMockRecorder) Install ¶
func (mr *MockInstallationAPIMockRecorder) Install(ctx, c, db interface{}) *gomock.Call
Install indicates an expected call of Install
type MockRegistrationAPI ¶
type MockRegistrationAPI struct {
// contains filtered or unexported fields
}
MockRegistrationAPI is a mock of RegistrationAPI interface
func NewMockRegistrationAPI ¶
func NewMockRegistrationAPI(ctrl *gomock.Controller) *MockRegistrationAPI
NewMockRegistrationAPI creates a new mock instance
func (*MockRegistrationAPI) DeregisterCluster ¶
DeregisterCluster mocks base method
func (*MockRegistrationAPI) EXPECT ¶
func (m *MockRegistrationAPI) EXPECT() *MockRegistrationAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRegistrationAPI) RegisterCluster ¶
RegisterCluster mocks base method
type MockRegistrationAPIMockRecorder ¶
type MockRegistrationAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockRegistrationAPIMockRecorder is the mock recorder for MockRegistrationAPI
func (*MockRegistrationAPIMockRecorder) DeregisterCluster ¶
func (mr *MockRegistrationAPIMockRecorder) DeregisterCluster(ctx, c interface{}) *gomock.Call
DeregisterCluster indicates an expected call of DeregisterCluster
func (*MockRegistrationAPIMockRecorder) RegisterCluster ¶
func (mr *MockRegistrationAPIMockRecorder) RegisterCluster(ctx, c interface{}) *gomock.Call
RegisterCluster indicates an expected call of RegisterCluster
type MockStateAPI ¶
type MockStateAPI struct {
// contains filtered or unexported fields
}
MockStateAPI is a mock of StateAPI interface
func NewMockStateAPI ¶
func NewMockStateAPI(ctrl *gomock.Controller) *MockStateAPI
NewMockStateAPI creates a new mock instance
func (*MockStateAPI) EXPECT ¶
func (m *MockStateAPI) EXPECT() *MockStateAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockStateAPIMockRecorder ¶
type MockStateAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockStateAPIMockRecorder is the mock recorder for MockStateAPI
func (*MockStateAPIMockRecorder) RefreshStatus ¶
func (mr *MockStateAPIMockRecorder) RefreshStatus(ctx, c, db interface{}) *gomock.Call
RefreshStatus indicates an expected call of RefreshStatus
type PrepareConfig ¶ added in v1.0.5
type RegistrationAPI ¶
type TransitionArgsCancelInstallation ¶ added in v1.0.4
type TransitionArgsCancelInstallation struct {
// contains filtered or unexported fields
}
type TransitionArgsCompleteInstallation ¶ added in v1.0.6
type TransitionArgsCompleteInstallation struct {
// contains filtered or unexported fields
}
type TransitionArgsHandlePreInstallationError ¶ added in v1.0.7
type TransitionArgsHandlePreInstallationError struct {
// contains filtered or unexported fields
}
type TransitionArgsPrepareForInstallation ¶ added in v1.0.6
type TransitionArgsPrepareForInstallation struct {
// contains filtered or unexported fields
}
type TransitionArgsResetCluster ¶ added in v1.0.4
type TransitionArgsResetCluster struct {
// contains filtered or unexported fields
}