Documentation ¶
Index ¶
- Variables
- type AtlasClusterStateDescriber
- type InvalidStateError
- type StateDescriber
- type StateTransition
- func (st *StateTransition) HasEndError() bool
- func (st *StateTransition) HasEndState() bool
- func (st *StateTransition) HasRetryableError() bool
- func (st *StateTransition) HasStartState() bool
- func (st *StateTransition) InInvalidError(err error) bool
- func (st *StateTransition) IsEndError(err error) bool
- func (st *StateTransition) IsEndState(state string) bool
- func (st *StateTransition) IsInvalidState(state string) bool
- func (st *StateTransition) IsRetryableError(err error) bool
- func (st *StateTransition) IsRetryableState(state string) bool
- func (st *StateTransition) IsStartState(state string) bool
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ClusterCreated = &StateTransition{ StartState: pointer.Get(clusterCreating), EndState: pointer.Get(clusterIdle), }
View Source
var ClusterDeleted = &StateTransition{ StartState: pointer.Get(clusterDeleting), EndErrorCode: pointer.Get(clusterNotFound), }
View Source
var ClusterUpdated = &StateTransition{ StartState: pointer.Get(clusterUpdating), EndState: pointer.Get(clusterIdle), }
View Source
var ClusterUpgraded = &StateTransition{ StartState: pointer.Get(clusterUpdating), EndState: pointer.Get(clusterIdle), RetryableErrorCodes: []string{clusterNotFound}, }
Functions ¶
This section is empty.
Types ¶
type AtlasClusterStateDescriber ¶
type AtlasClusterStateDescriber struct {
// contains filtered or unexported fields
}
func NewAtlasClusterStateDescriber ¶
func NewAtlasClusterStateDescriber(s store.AtlasClusterDescriber, projectID, clusterName string) *AtlasClusterStateDescriber
func (*AtlasClusterStateDescriber) GetState ¶
func (describer *AtlasClusterStateDescriber) GetState() (string, error)
type InvalidStateError ¶
type InvalidStateError struct { State *string ErrorCode *string ExpectedState *string ExpectedErrorCode *string }
func (*InvalidStateError) Error ¶
func (err *InvalidStateError) Error() string
type StateDescriber ¶
type StateTransition ¶
type StateTransition struct { StartState *string EndState *string EndErrorCode *string RetryableStates []string RetryableErrorCodes []string }
func (*StateTransition) HasEndError ¶
func (st *StateTransition) HasEndError() bool
func (*StateTransition) HasEndState ¶
func (st *StateTransition) HasEndState() bool
func (*StateTransition) HasRetryableError ¶
func (st *StateTransition) HasRetryableError() bool
func (*StateTransition) HasStartState ¶
func (st *StateTransition) HasStartState() bool
func (*StateTransition) InInvalidError ¶
func (st *StateTransition) InInvalidError(err error) bool
func (*StateTransition) IsEndError ¶
func (st *StateTransition) IsEndError(err error) bool
func (*StateTransition) IsEndState ¶
func (st *StateTransition) IsEndState(state string) bool
func (*StateTransition) IsInvalidState ¶
func (st *StateTransition) IsInvalidState(state string) bool
func (*StateTransition) IsRetryableError ¶
func (st *StateTransition) IsRetryableError(err error) bool
func (*StateTransition) IsRetryableState ¶
func (st *StateTransition) IsRetryableState(state string) bool
func (*StateTransition) IsStartState ¶
func (st *StateTransition) IsStartState(state string) bool
type Watcher ¶
type Watcher struct { Timeout time.Duration // TODO: Timeout support - CLOUDP-181597 NonConstantBackoff bool // contains filtered or unexported fields }
func NewWatcher ¶
func NewWatcher(stateTransition StateTransition, describer StateDescriber) *Watcher
func NewWatcherWithDefaultWait ¶
func NewWatcherWithDefaultWait(stateTransition StateTransition, describer StateDescriber, defaultWait time.Duration) *Watcher
Click to show internal directories.
Click to hide internal directories.