cirrus

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Windows Platform = "windows"
	Linux   Platform = "linux"
	Darwin  Platform = "darwin"

	Arm64 Arch = "arm64"
	Amd64 Arch = "amd64"
)

Functions

func CirrusPort

func CirrusPort() (*int, error)

If cirrus is enable it will return the port to be opened

func GetToken

func GetToken() string

Get token

func Init

func Init(args *PersistentWorkerArgs)

func PersistentWorkerSnippet

func PersistentWorkerSnippet(username string) (*string, error)

func PersistentWorkerSnippetAsCloudInitWritableFile

func PersistentWorkerSnippetAsCloudInitWritableFile(username string) (*string, error)

If we add the snippet as part of a cloud init file the strategy would be create the file with write_files: i.e. write_files:

# Cirrus service setup
- content: |
    {{ .CirrusSnippet }} <----- 6 spaces

to do so we need to indent 6 spaces each line of the snippet

Types

type Arch

type Arch string

type PersistentWorkerArgs

type PersistentWorkerArgs struct {
	Name     string
	Token    string
	Platform *Platform
	Arch     *Arch
	Labels   map[string]string
}

type Platform

type Platform string

Jump to

Keyboard shortcuts

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