client

package
v0.0.0-...-439fd0a Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client represents the client-accessible part of the state.

func NewClient

func NewClient(c api.Connection, logger Logger) *Client

NewClient returns an object that can be used to access client-specific functionality.

func (*Client) AbortCurrentUpgrade

func (c *Client) AbortCurrentUpgrade() error

AbortCurrentUpgrade aborts and archives the current upgrade synchronisation record, if any.

func (*Client) Close

func (c *Client) Close() error

Close closes the Client's underlying State connection Client is unique among the api.State facades in closing its own State connection, but it is conventional to use a Client object without any access to its underlying state connection.

func (*Client) SetModelAgentVersion

func (c *Client) SetModelAgentVersion(version version.Number, stream string, ignoreAgentVersions bool) error

SetModelAgentVersion sets the model agent-version setting to the given value.

func (*Client) Status

func (c *Client) Status(args *StatusArgs) (*params.FullStatus, error)

Status returns the status of the juju model.

func (*Client) StatusHistory

func (c *Client) StatusHistory(kind status.HistoryKind, tag names.Tag, filter status.StatusHistoryFilter) (status.History, error)

StatusHistory retrieves the last <size> results of <kind:combined|agent|workload|machine|machineinstance|container|containerinstance> status for <name> unit

func (*Client) UploadTools

func (c *Client) UploadTools(r io.ReadSeeker, vers version.Binary, additionalSeries ...string) (tools.List, error)

UploadTools uploads tools at the specified location to the API server over HTTPS.

func (*Client) WatchAll

func (c *Client) WatchAll() (*api.AllWatcher, error)

WatchAll returns an AllWatcher, from which you can request the Next collection of Deltas.

func (*Client) WatchDebugLog

func (c *Client) WatchDebugLog(args common.DebugLogParams) (<-chan common.LogMessage, error)

WatchDebugLog returns a channel of structured Log Messages. Only log entries that match the filtering specified in the DebugLogParams are returned.

type Logger

type Logger interface {
	Errorf(string, ...interface{})
}

Logger is the interface used by the client to log errors.

type StatusArgs

type StatusArgs struct {
	// Patterns is used to filter the status response.
	Patterns []string

	// IncludeStorage can be set to true to return storage in the response.
	IncludeStorage bool
}

StatusArgs holds the options for a call to Status.

Jump to

Keyboard shortcuts

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