Documentation ¶
Index ¶
- Constants
- Variables
- func DiskTypeURL(project, zone, diskType string) string
- func DiskURL(project, zone, disks string) string
- func InstanceURL(project, zone, instance string) string
- func TargetPoolURL(project, region, targetPool string) string
- type Client
- type Disk
- type DiskConfig
- type DiskProvider
- type Network
- type NetworkConfig
- func (c *NetworkConfig) Firewall(instance string) *compute.Firewall
- func (c *NetworkConfig) ForwardingRule(instance, targetPoolURL string) []*compute.ForwardingRule
- func (c *NetworkConfig) Group(instance string) string
- func (c *NetworkConfig) ID(instance string) string
- func (c *NetworkConfig) Name(instance string) string
- func (c *NetworkConfig) TargetPool(project, zone, instance string) *compute.TargetPool
- func (c *NetworkConfig) Validate() error
- type NetworkProvider
- type SessionAffinity
Constants ¶
View Source
const MaxWaitDuration = time.Minute
Variables ¶
View Source
var ( NetworkBaseName = "docker-network-%s-%s" DiskDeviceNameBaseName = "docker-volume-%s" DiskDevBasePath = "/dev/disk/by-id/google-%s" )
Functions ¶
func DiskTypeURL ¶
func InstanceURL ¶
func TargetPoolURL ¶
Types ¶
type Disk ¶
type Disk struct {
Client
}
func (*Disk) Attach ¶
func (d *Disk) Attach(c *DiskConfig) error
func (*Disk) Create ¶
func (d *Disk) Create(c *DiskConfig) error
func (*Disk) Delete ¶
func (d *Disk) Delete(c *DiskConfig) error
func (*Disk) Detach ¶
func (d *Disk) Detach(c *DiskConfig) error
type DiskConfig ¶
type DiskConfig struct { Name string Type string SizeGb int64 SourceSnapshot string SourceImage string }
func (*DiskConfig) Dev ¶
func (c *DiskConfig) Dev() string
func (*DiskConfig) DeviceName ¶
func (c *DiskConfig) DeviceName() string
func (*DiskConfig) Disk ¶
func (c *DiskConfig) Disk(project, zone string) *compute.Disk
func (*DiskConfig) MountPoint ¶
func (c *DiskConfig) MountPoint(root string) string
func (*DiskConfig) Validate ¶
func (c *DiskConfig) Validate() error
type DiskProvider ¶
type DiskProvider interface { Create(c *DiskConfig) error Attach(c *DiskConfig) error Detach(c *DiskConfig) error Delete(c *DiskConfig) error List() ([]*compute.Disk, error) }
type Network ¶
type Network struct {
Client
}
func (*Network) Create ¶
func (n *Network) Create(c *NetworkConfig) error
func (*Network) Delete ¶
func (n *Network) Delete(c *NetworkConfig) error
type NetworkConfig ¶
type NetworkConfig struct { GroupName string Container string Network string Address string Ports []docker.Port Source struct { Ranges []string Tags []string } SessionAffinity SessionAffinity }
func (*NetworkConfig) Firewall ¶
func (c *NetworkConfig) Firewall(instance string) *compute.Firewall
func (*NetworkConfig) ForwardingRule ¶
func (c *NetworkConfig) ForwardingRule(instance, targetPoolURL string) []*compute.ForwardingRule
func (*NetworkConfig) Group ¶
func (c *NetworkConfig) Group(instance string) string
func (*NetworkConfig) ID ¶
func (c *NetworkConfig) ID(instance string) string
func (*NetworkConfig) Name ¶
func (c *NetworkConfig) Name(instance string) string
func (*NetworkConfig) TargetPool ¶
func (c *NetworkConfig) TargetPool(project, zone, instance string) *compute.TargetPool
func (*NetworkConfig) Validate ¶
func (c *NetworkConfig) Validate() error
type NetworkProvider ¶
type NetworkProvider interface { Create(c *DiskConfig) error Delete(c *DiskConfig) error }
type SessionAffinity ¶
type SessionAffinity string
Click to show internal directories.
Click to hide internal directories.