api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0, EPL-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

type BaseClient interface {
	Domain() string

	Stop() error
}

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

type UpdateAgent interface {
	Start(context.Context) error
	Stop() error
}

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

UpdateOrchestrator defines an interface for controlling the update process and applying of the desired state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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