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 ¶
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.
Click to show internal directories.
Click to hide internal directories.