Documentation ¶
Index ¶
- func BuildInstanceMetadataItem(key, value string) *api.MetadataItems
- func CreateMachineImageObject(ctx context.Context, project string, name string) (*api.MachineImage, error)
- func WaitForSerialOutput(successMatch string, failureMatches []string, port int64, ...) error
- type File
- type Image
- type Instance
- type InstanceBeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInstanceMetadataItem ¶
func BuildInstanceMetadataItem(key, value string) *api.MetadataItems
BuildInstanceMetadataItem create an metadata item
func CreateMachineImageObject ¶
func CreateMachineImageObject(ctx context.Context, project string, name string) (*api.MachineImage, error)
CreateMachineImageObject creates a machine image object
Types ¶
type File ¶
type File struct { *api.Object Client storageApi.Client FileObject *storageApi.ObjectHandle // contains filtered or unexported fields }
File is a gcs file.
func CreateFileObject ¶
CreateFileObject creates an file object to be operated by API client
type Image ¶
type Image struct { *api.Image Client daisyCompute.Client Project string }
Image is a compute image.
func CreateImageObject ¶
CreateImageObject creates an image object to be operated by API client
type Instance ¶
type Instance struct { *api.Instance Client daisyCompute.Client Project, Zone string IsWindows bool }
Instance is a compute instance.
func CreateInstanceObject ¶
func CreateInstanceObject(ctx context.Context, project string, zone string, name string, isWindows bool) (*Instance, error)
CreateInstanceObject creates an instance object to be operated by GA API client
func SetMetadata ¶
func SetMetadata(ctx context.Context, project, zone, name, key, value string, isWindows bool) (*Instance, error)
SetMetadata sets metadata for the given instance.
func (*Instance) RestartWithScriptCode ¶
RestartWithScriptCode restarts the instance with given startup script.
func (*Instance) StartWithScriptCode ¶
StartWithScriptCode starts the instance with given startup script and metadata
type InstanceBeta ¶
type InstanceBeta struct { *apiBeta.Instance Client daisyCompute.Client Project, Zone string IsWindows bool }
InstanceBeta is a compute instance using Beta API.
func CreateInstanceBeta ¶
func CreateInstanceBeta(ctx context.Context, project string, zone string, name string, isWindows bool, machineImageName string) (*InstanceBeta, error)
CreateInstanceBeta creates a VM instance (not just an object representing an existing VM) using Beta API
func CreateInstanceBetaObject ¶
func CreateInstanceBetaObject(ctx context.Context, project string, zone string, name string, isWindows bool) (*InstanceBeta, error)
CreateInstanceBetaObject creates an instance object to be operated by Beta API client
func (*InstanceBeta) Cleanup ¶
func (i *InstanceBeta) Cleanup() error
Cleanup deletes the InstanceBeta.
func (*InstanceBeta) StartWithScriptCode ¶
func (i *InstanceBeta) StartWithScriptCode(script string, instanceMetadata map[string]string) error
StartWithScriptCode starts the instance with given startup script and metadata.
func (*InstanceBeta) WaitForSerialOutput ¶
func (i *InstanceBeta) WaitForSerialOutput(match string, failureMatches []string, port int64, interval, timeout time.Duration) error
WaitForSerialOutput waits to a string match on a serial port.