cloudlaunch

package
v0.0.0-...-2148625 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 23 Imported by: 9

Documentation

Overview

Package cloudlaunch helps binaries run themselves on The Cloud, copying themselves to GCE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Name is the name of a service to run.
	// This is the name of the systemd service (without .service)
	// and the name of the GCE instance.
	Name string

	// RestartPolicy controls whether the binary automatically restarts
	// on updates. The zero value means automatic.
	RestartPolicy RestartPolicy

	// UpdateStrategy sets the CoreOS automatic update strategy, and the
	// associated reboots. Possible values are "best-effort", "etcd-lock",
	// "reboot", "off", with "best-effort" being the default. See
	// https://coreos.com/os/docs/latest/update-strategies.html
	UpdateStrategy string

	// BinaryBucket and BinaryObject are the GCS bucket and object
	// within that bucket containing the Linux binary to download
	// on boot and occasionally run. This binary must be public
	// (at least for now).
	BinaryBucket string
	BinaryObject string // defaults to Name

	GCEProjectID string
	Zone         string // defaults to us-central1-f
	SSD          bool

	Scopes []string // any additional scopes

	MachineType  string
	InstanceName string
}

func (*Config) MaybeDeploy

func (c *Config) MaybeDeploy()

type RestartPolicy

type RestartPolicy int

RestartPolicy controls whether the binary automatically restarts.

const (
	RestartOnUpdates RestartPolicy = iota
	RestartNever
)

Jump to

Keyboard shortcuts

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