cloudinit

package
v0.0.0-...-e258396 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cloudinit has some helpers to set up cloud-init configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudInit

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

CloudInit contains necessary data to drop cloud-init user data files for WSL's data source to pick them up.

func New

func New(ctx context.Context, conf Config, publicDir string) (CloudInit, error)

New creates a CloudInit object and attaches it to the configuration notifier.

func (CloudInit) RemoveDistroData

func (c CloudInit) RemoveDistroData(distroName string) (err error)

RemoveDistroData removes cloud-init user data to be used for a distro in particular.

No error is returned if the data did not exist.

func (CloudInit) Update

func (c CloudInit) Update(ctx context.Context)

Update is syntax sugar to call writeAgentData and log any error.

func (CloudInit) WriteDistroData

func (c CloudInit) WriteDistroData(distroName string, cloudInit string) error

WriteDistroData writes cloud-init user data to be used for a distro in particular.

type Config

type Config interface {
	Subscription() (string, config.Source, error)
	LandscapeClientConfig() (string, config.Source, error)
}

Config is a configuration provider for ProToken and the Landscape config.

Jump to

Keyboard shortcuts

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