cloudlaunch - ActiveState ActiveGo 1.8
...

Package cloudlaunch

import "go4.org/cloud/cloudlaunch"
Overview
Index

Overview ▾

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

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

RestartPolicy controls whether the binary automatically restarts.

type RestartPolicy int
const (
    RestartOnUpdates RestartPolicy = iota
    RestartNever
)