google

package
v0.0.0-...-79a645e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProvisionerType for GCP provisioner
	ProvisionerType = "google-compute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Bucket string `json:"bucket"` // Name of the bucket
	Key    string `json:"key"`    // base64 encoded contents of a (JSON) Google Cloud Platform service account key file
}

Config contains configuration fields required by the Provisioner

type ProvisionArgs

type ProvisionArgs struct {
	Name            string
	Description     string
	Force           bool
	ReadyWhenUsable bool
}

ProvisionArgs TODO:

type Provisioner

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

Provisioner ...

func NewProvisioner

func NewProvisioner(log elog.View, cfg *Config) (*Provisioner, error)

NewProvisioner - Create a Google Provisioner object

func (*Provisioner) DiskFormat

func (p *Provisioner) DiskFormat() vdisk.Format

DiskFormat returns the provisioners required disk format

func (*Provisioner) Marshal

func (p *Provisioner) Marshal() ([]byte, error)

Marshal returns json provisioner as bytes

func (*Provisioner) Provision

func (p *Provisioner) Provision(args *provisioners.ProvisionArgs) error

Provision provisions BUILDABLE to GCP

func (*Provisioner) SizeAlign

func (p *Provisioner) SizeAlign() vcfg.Bytes

SizeAlign returns vcfg GiB size in bytes

func (*Provisioner) Type

func (p *Provisioner) Type() string

Type returns 'google-compute'

func (*Provisioner) Validate

func (p *Provisioner) Validate() error

Validate ...

type ProvisionerArgs

type ProvisionerArgs struct {
	Logger elog.View
	Data   []byte
}

ProvisionerArgs ...

Jump to

Keyboard shortcuts

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