Documentation
¶
Index ¶
- func Cancel(ctx context.Context, cfg *config.Config) (string, error)
- func Check(ctx context.Context, cfg *config.Config, options ...UpdateOpt) (target.Targets, *status.CurrentStatus, error)
- func Fetch(ctx context.Context, cfg *config.Config, toVersion int, options ...UpdateOpt) error
- func Install(ctx context.Context, cfg *config.Config, options ...UpdateOpt) error
- func Start(ctx context.Context, cfg *config.Config, options ...UpdateOpt) error
- func Update(ctx context.Context, cfg *config.Config, toVersion int, options ...UpdateOpt) error
- type DiffOption
- type DiffOptions
- type DiffReport
- type FetchProgressFunc
- type InstallProgressFunc
- type PostStateHandler
- type PreStateHandler
- type StartProgressFunc
- type StateName
- type UpdateInfo
- type UpdateMode
- type UpdateOpt
- func WithEventSender(sender *events.EventSender) UpdateOpt
- func WithFetchProgressHandler(handler FetchProgressFunc) UpdateOpt
- func WithForceUpdate(enabled bool) UpdateOpt
- func WithGatewayClient(client *client.GatewayClient) UpdateOpt
- func WithInstallProgressHandler(handler InstallProgressFunc) UpdateOpt
- func WithMaxAttempts(count int) UpdateOpt
- func WithPostStateHandler(handler PostStateHandler) UpdateOpt
- func WithPreStateHandler(handler PreStateHandler) UpdateOpt
- func WithRequireLatest(enabled bool) UpdateOpt
- func WithStartProgressHandler(handler StartProgressFunc) UpdateOpt
- func WithSyncCurrent(enabled bool) UpdateOpt
- func WithTUF(enabled bool) UpdateOpt
- type UpdateOpts
- type UpdateRunner
- type UpdateRunnerOpt
- type UpdateRunnerOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiffOption ¶ added in v1.2.0
type DiffOption func(*DiffOptions)
func WithTUFEnabled ¶ added in v1.2.0
func WithTUFEnabled(enabled bool) DiffOption
type DiffOptions ¶ added in v1.2.0
type DiffOptions struct {
EnableTUF bool
}
type DiffReport ¶ added in v1.2.0
type DiffReport struct {
FromTarget *target.Target `json:"from_target"`
ToTarget *target.Target `json:"to_target"`
WireSize int64 `json:"wire_size"`
DiskSize int64 `json:"disk_size"`
// Blobs maps app base URI to list of blobs info, grouping by app
Blobs map[string][]compose.BlobInfo `json:"blobs"`
}
func Diff ¶ added in v1.2.0
func Diff(ctx context.Context, cfg *config.Config, fromVersion, toVersion int, options ...DiffOption) (*DiffReport, error)
type FetchProgressFunc ¶ added in v1.0.0
type FetchProgressFunc = compose.FetchProgressFunc
type InstallProgressFunc ¶ added in v1.0.0
type InstallProgressFunc = compose.InstallProgressFunc
type PostStateHandler ¶ added in v1.0.0
type PostStateHandler func(StateName, *UpdateInfo)
type PreStateHandler ¶ added in v1.0.0
type PreStateHandler func(StateName, *UpdateInfo)
type StartProgressFunc ¶ added in v1.0.0
type StartProgressFunc = compose.AppStartProgress
type StateName ¶ added in v1.0.0
type StateName = state.ActionName
type UpdateInfo ¶ added in v1.0.0
type UpdateInfo = state.UpdateInfo
type UpdateMode ¶ added in v1.0.0
type UpdateMode = state.UpdateMode
type UpdateOpt ¶ added in v1.0.0
type UpdateOpt func(*UpdateOpts)
func WithEventSender ¶ added in v1.0.0
func WithEventSender(sender *events.EventSender) UpdateOpt
func WithFetchProgressHandler ¶ added in v1.0.0
func WithFetchProgressHandler(handler FetchProgressFunc) UpdateOpt
func WithForceUpdate ¶ added in v1.0.0
func WithGatewayClient ¶ added in v1.0.0
func WithGatewayClient(client *client.GatewayClient) UpdateOpt
func WithInstallProgressHandler ¶ added in v1.0.0
func WithInstallProgressHandler(handler InstallProgressFunc) UpdateOpt
func WithMaxAttempts ¶ added in v1.0.0
func WithPostStateHandler ¶ added in v1.0.0
func WithPostStateHandler(handler PostStateHandler) UpdateOpt
func WithPreStateHandler ¶ added in v1.0.0
func WithPreStateHandler(handler PreStateHandler) UpdateOpt
func WithRequireLatest ¶ added in v1.0.0
func WithStartProgressHandler ¶ added in v1.0.0
func WithStartProgressHandler(handler StartProgressFunc) UpdateOpt
func WithSyncCurrent ¶ added in v1.0.0
type UpdateOpts ¶ added in v1.0.0
type UpdateOpts struct {
UpdateRunnerOpts
EnableTUF bool
Force bool
SyncCurrent bool
MaxAttempts int
RequireLatest bool
FetchProgressHandler FetchProgressFunc
InstallProgressHandler InstallProgressFunc
StartProgressHandler StartProgressFunc
}
type UpdateRunner ¶ added in v1.0.0
type UpdateRunner struct {
// contains filtered or unexported fields
}
UpdateRunner runs the OTA update states
func (*UpdateRunner) GetFromTarget ¶ added in v1.0.0
func (sm *UpdateRunner) GetFromTarget() target.Target
type UpdateRunnerOpt ¶ added in v1.0.0
type UpdateRunnerOpt func(*UpdateRunnerOpts)
type UpdateRunnerOpts ¶ added in v1.0.0
type UpdateRunnerOpts struct {
EventSender *events.EventSender
GatewayClient *client.GatewayClient
PreStateHandler PreStateHandler
PostStateHandler PostStateHandler
}
Click to show internal directories.
Click to hide internal directories.