upgrader

package
v0.0.0-...-dda4347 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithTracer = base.WithTracer

WithTracer returns an Option that configures the Client to use the supplied tracer.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to an upgrader worker's view of the state.

func NewClient

func NewClient(caller base.APICaller, options ...Option) *Client

NewClient returns a version of the api client that provides functionality required by the upgrader worker.

func (*Client) DesiredVersion

func (st *Client) DesiredVersion(ctx context.Context, tag string) (version.Number, error)

func (*Client) SetVersion

func (st *Client) SetVersion(ctx context.Context, tag string, v version.Binary) error

SetVersion sets the tools version associated with the entity with the given tag, which must be the tag of the entity that the upgrader is running on behalf of.

func (*Client) Tools

func (st *Client) Tools(ctx context.Context, tag string) (tools.List, error)

Tools returns the agent tools that should run on the given entity, along with a flag whether to disable SSL hostname verification.

func (*Client) WatchAPIVersion

func (st *Client) WatchAPIVersion(ctx context.Context, agentTag string) (watcher.NotifyWatcher, error)

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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