Documentation
¶
Index ¶
- func NewSelfUpdateManager(opts []MgrOpt, registryCtx *registry.ServiceRegistryContext) (orchestration.UpdateManager, error)
- type ApplyResult
- type MgrOpt
- func WithConnectionAcknowledgeTimeout(acknowledgeTimeout time.Duration) MgrOpt
- func WithConnectionBroker(broker string) MgrOpt
- func WithConnectionClientPassword(password string) MgrOpt
- func WithConnectionClientUsername(username string) MgrOpt
- func WithConnectionConnectTimeout(connectTimeout time.Duration) MgrOpt
- func WithConnectionDisconnectTimeout(disconnectTimeout time.Duration) MgrOpt
- func WithConnectionKeepAlive(keepAlive time.Duration) MgrOpt
- func WithConnectionSubscribeTimeout(subscribeTimeout time.Duration) MgrOpt
- func WithConnectionUnsubscribeTimeout(unsubscribeTimeout time.Duration) MgrOpt
- func WithEnableReboot(reboot bool) MgrOpt
- func WithRebootTimeout(rebootTimeout string) MgrOpt
- func WithTimeout(timeout string) MgrOpt
- type OperationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSelfUpdateManager ¶
func NewSelfUpdateManager(opts []MgrOpt, registryCtx *registry.ServiceRegistryContext) (orchestration.UpdateManager, error)
NewSelfUpdateManager instantiates a new self update manager
Types ¶
type ApplyResult ¶
type ApplyResult struct { Result OperationResult RebootTimeout time.Duration RebootRequired bool Err error }
ApplyResult holds the result of a self update apply
type MgrOpt ¶
type MgrOpt func(mgrOptions *mgrOpts) error
MgrOpt defines the creation configuration options for a self update manager implementation
func WithConnectionAcknowledgeTimeout ¶
WithConnectionAcknowledgeTimeout configures the timeout for the acknowledge receival
func WithConnectionBroker ¶
WithConnectionBroker configures the broker, where the connection will be established
func WithConnectionClientPassword ¶
WithConnectionClientPassword configures the client password used when establishing connection to the broker
func WithConnectionClientUsername ¶
WithConnectionClientUsername configures the client username used when establishing connection to the broker
func WithConnectionConnectTimeout ¶
WithConnectionConnectTimeout configures the timeout before terminating the connect attempt
func WithConnectionDisconnectTimeout ¶
WithConnectionDisconnectTimeout configures the duration of inactivity before disconnecting from the broker
func WithConnectionKeepAlive ¶
WithConnectionKeepAlive configures the time between between each check for the connection presence
func WithConnectionSubscribeTimeout ¶
WithConnectionSubscribeTimeout configures the timeout before terminating the subscribe attempt
func WithConnectionUnsubscribeTimeout ¶
WithConnectionUnsubscribeTimeout configures the timeout before terminating the unsubscribe attempt
func WithEnableReboot ¶
WithEnableReboot configures the required reboot parameter to the self update manager runtime configuration
func WithRebootTimeout ¶
WithRebootTimeout configures the reboot timeout parameter to the self update manager runtime configuration
func WithTimeout ¶
WithTimeout configures the timeout parameter to the self update manager runtime configuration
type OperationResult ¶
type OperationResult int
OperationResult holds the result of a self update operation
const ( //SelfUpdateNoResult represents a self update operation initial state SelfUpdateNoResult OperationResult = iota // SelfUpdateResultInstalled represents a self update operation finished successfully SelfUpdateResultInstalled // SelfUpdateResultRejected represents a self rejected update operation SelfUpdateResultRejected // SelfUpdateResultError represents a self update operation failed with error SelfUpdateResultError // SelfUpdateResultTimeout represents a self update operation failed with expired timeout SelfUpdateResultTimeout )