ubuntupro

package
v0.0.0-...-318087d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is our wrapper for Ubuntu Pro configuration and the Ubuntu Pro CLI.

func New

func New(ctx context.Context, osName string) *Client

New returns a new Client that watches /var/lib/ubuntu-advantage for changes to LXD configuration and contains a shim for the actual Ubuntu Pro CLI. If the host is not Ubuntu, it returns a static Client that always returns guestAttachSettingOff.

func (*Client) GetGuestToken

func (s *Client) GetGuestToken(ctx context.Context, instanceSetting string) (*api.DevLXDUbuntuProGuestTokenResponse, error)

GetGuestToken returns a 403 Forbidden error if the host or the instance has guestAttachSettingOff, otherwise it calls the pro shim to get a token.

func (*Client) GuestAttachSettings

func (s *Client) GuestAttachSettings(instanceSetting string) api.DevLXDUbuntuProSettings

GuestAttachSettings returns UbuntuProSettings based on the instance configuration and the GuestAttachSetting of the host.

Jump to

Keyboard shortcuts

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