Documentation
¶
Index ¶
- type BaseClient
- type CurrentStateHandler
- type DesiredStateClient
- type DesiredStateFeedbackHandler
- type OwnerConsentAgentClient
- type OwnerConsentAgentHandler
- type OwnerConsentClient
- type OwnerConsentHandler
- type StateHandler
- type UpdateAgent
- type UpdateAgentClient
- type UpdateAgentHandler
- type UpdateManager
- type UpdateManagerCallback
- type UpdateManagerConfig
- type UpdateOrchestrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
BaseClient defines a common interface for both UpdateAgentClient and DesiredStateClient
type CurrentStateHandler ¶
type CurrentStateHandler interface {
HandleCurrentStateEvent(domain string, activityID string, currentState *types.Inventory)
}
CurrentStateHandler defines a callback for handling current state events
type DesiredStateClient ¶
type DesiredStateClient interface { BaseClient Start(StateHandler) error SendDesiredState(string, *types.DesiredState) error SendDesiredStateCommand(string, *types.DesiredStateCommand) error SendCurrentStateGet(string) error }
DesiredStateClient defines an interface for triggering requests towards an Update Agent implementation
type DesiredStateFeedbackHandler ¶
type DesiredStateFeedbackHandler interface {
HandleDesiredStateFeedbackEvent(domain string, activityID string, baseline string, status types.StatusType, message string, actions []*types.Action)
}
DesiredStateFeedbackHandler defines a callback for handling desired state feedback events
type OwnerConsentAgentClient ¶
type OwnerConsentAgentClient interface { BaseClient Start(OwnerConsentAgentHandler) error SendOwnerConsentFeedback(string, *types.OwnerConsentFeedback) error }
OwnerConsentAgentClient defines an interface for handling for owner consent requests
type OwnerConsentAgentHandler ¶
type OwnerConsentAgentHandler interface {
HandleOwnerConsent(string, int64, *types.OwnerConsent) error
}
OwnerConsentAgentHandler defines functions for handling the owner consent requests
type OwnerConsentClient ¶
type OwnerConsentClient interface { BaseClient Start(OwnerConsentHandler) error SendOwnerConsent(string, *types.OwnerConsent) error }
OwnerConsentClient defines an interface for triggering requests for owner consent
type OwnerConsentHandler ¶
type OwnerConsentHandler interface {
HandleOwnerConsentFeedback(string, int64, *types.OwnerConsentFeedback) error
}
OwnerConsentHandler defines functions for handling the owner consent feedback
type StateHandler ¶
type StateHandler interface { HandleDesiredStateFeedback(string, int64, *types.DesiredStateFeedback) error HandleCurrentState(string, int64, *types.Inventory) error }
StateHandler defines functions for handling the desired state feedback / current state responses
type UpdateAgent ¶
UpdateAgent defines the interface for starting/stopping an update agent.
type UpdateAgentClient ¶
type UpdateAgentClient interface { BaseClient Start(UpdateAgentHandler) error SendCurrentState(string, *types.Inventory) error SendDesiredStateFeedback(string, *types.DesiredStateFeedback) error }
UpdateAgentClient defines an interface for interacting with the UpdateAgent API
type UpdateAgentHandler ¶
type UpdateAgentHandler interface { HandleDesiredState(string, int64, *types.DesiredState) error HandleDesiredStateCommand(string, int64, *types.DesiredStateCommand) error HandleCurrentStateGet(string, int64) error }
UpdateAgentHandler defines functions for handling the desired state / current state requests
type UpdateManager ¶
type UpdateManager interface { Name() string SetCallback(callback UpdateManagerCallback) WatchEvents(ctx context.Context) Apply(ctx context.Context, activityID string, desiredState *types.DesiredState) Command(ctx context.Context, activityID string, command *types.DesiredStateCommand) Get(ctx context.Context, activityID string) (*types.Inventory, error) Dispose() error }
UpdateManager provides the orchestration management abstraction
type UpdateManagerCallback ¶
type UpdateManagerCallback interface { DesiredStateFeedbackHandler CurrentStateHandler }
UpdateManagerCallback defines a callback for event handling
type UpdateManagerConfig ¶
type UpdateManagerConfig struct { Name string `json:"-"` RebootRequired bool `json:"rebootRequired"` ReadTimeout string `json:"readTimeout"` }
UpdateManagerConfig holds configuration properties for an update manager.
type UpdateOrchestrator ¶
type UpdateOrchestrator interface { Apply(context.Context, map[string]UpdateManager, string, *types.DesiredState, DesiredStateFeedbackHandler) bool DesiredStateFeedbackHandler OwnerConsentHandler }
UpdateOrchestrator defines an interface for controlling the update process and applying of the desired state