config

package
v0.0.0-...-4a11b79 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package config contains VM config definitions.

Index

Constants

This section is empty.

Variables

View Source
var AccessConfigType_name = map[int32]string{
	0: "ONE_TO_ONE_NAT",
}
View Source
var AccessConfigType_value = map[string]int32{
	"ONE_TO_ONE_NAT": 0,
}
View Source
var DiskInterface_name = map[int32]string{
	0: "SCSI",
	1: "NVME",
}
View Source
var DiskInterface_value = map[string]int32{
	"SCSI": 0,
	"NVME": 1,
}

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptor.FileDescriptorSet

FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.

Will not return nil.

Do NOT modify the returned descriptor.

func RegisterConfigurationServer

func RegisterConfigurationServer(s prpc.Registrar, srv ConfigurationServer)

Types

type AccessConfig

type AccessConfig struct {
	// The type of config this is.
	Type                 AccessConfigType `protobuf:"varint,1,opt,name=type,proto3,enum=config.AccessConfigType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

A description of a network access config.

func (*AccessConfig) Descriptor

func (*AccessConfig) Descriptor() ([]byte, []int)

func (*AccessConfig) GetType

func (m *AccessConfig) GetType() AccessConfigType

func (*AccessConfig) ProtoMessage

func (*AccessConfig) ProtoMessage()

func (*AccessConfig) Reset

func (m *AccessConfig) Reset()

func (*AccessConfig) String

func (m *AccessConfig) String() string

func (*AccessConfig) XXX_DiscardUnknown

func (m *AccessConfig) XXX_DiscardUnknown()

func (*AccessConfig) XXX_Marshal

func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessConfig) XXX_Merge

func (m *AccessConfig) XXX_Merge(src proto.Message)

func (*AccessConfig) XXX_Size

func (m *AccessConfig) XXX_Size() int

func (*AccessConfig) XXX_Unmarshal

func (m *AccessConfig) XXX_Unmarshal(b []byte) error

type AccessConfigType

type AccessConfigType int32

A network access config type. GCE's default and only value is 1:1 NAT.

const (
	// 1:1 network address translation.
	AccessConfigType_ONE_TO_ONE_NAT AccessConfigType = 0
)

func (AccessConfigType) EnumDescriptor

func (AccessConfigType) EnumDescriptor() ([]byte, []int)

func (AccessConfigType) String

func (x AccessConfigType) String() string

type Amount

type Amount struct {
	// The amount of VMs to have at a particular time.
	Change []*Schedule `protobuf:"bytes,2,rep,name=change,proto3" json:"change,omitempty"`
	// The minimum amount of VMs allowed, and the amount of VMs to initialize to.
	Min int32 `protobuf:"varint,3,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum amount of VMs allowed.
	Max                  int32    `protobuf:"varint,4,opt,name=max,proto3" json:"max,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

An amount of VMs.

func (*Amount) Descriptor

func (*Amount) Descriptor() ([]byte, []int)

func (*Amount) GetChange

func (m *Amount) GetChange() []*Schedule

func (*Amount) GetMax

func (m *Amount) GetMax() int32

func (*Amount) GetMin

func (m *Amount) GetMin() int32

func (*Amount) ProtoMessage

func (*Amount) ProtoMessage()

func (*Amount) Reset

func (m *Amount) Reset()

func (*Amount) String

func (m *Amount) String() string

func (*Amount) Validate

func (a *Amount) Validate(c *validation.Context)

Validate validates this amount.

func (*Amount) XXX_DiscardUnknown

func (m *Amount) XXX_DiscardUnknown()

func (*Amount) XXX_Marshal

func (m *Amount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Amount) XXX_Merge

func (m *Amount) XXX_Merge(src proto.Message)

func (*Amount) XXX_Size

func (m *Amount) XXX_Size() int

func (*Amount) XXX_Unmarshal

func (m *Amount) XXX_Unmarshal(b []byte) error

type Config

type Config struct {
	// The amount of these VMs.
	Amount *Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// The attributes of these VMs.
	Attributes *VM `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
	// The lifetime of these VMs.
	// At the end of their lifetime, each VM is deleted and replaced.
	Lifetime *TimePeriod `protobuf:"bytes,3,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	// The prefix to use when naming these VMs.
	Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// The hostname of the Swarming server these VMs should connect to.
	Swarming string `protobuf:"bytes,6,opt,name=swarming,proto3" json:"swarming,omitempty"`
	// The timeout of these VMs.
	// If no Swarming bot has connected by the timeout,
	// the VM is deleted and replaced.
	Timeout *TimePeriod `protobuf:"bytes,7,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Chrome Infra Auth groups considered to own this config.
	Owner []string `protobuf:"bytes,9,rep,name=owner,proto3" json:"owner,omitempty"`
	// Should only be set by the server. The revision of this config.
	Revision string `protobuf:"bytes,5,opt,name=revision,proto3" json:"revision,omitempty"`
	// Should only be set by the server. The current amount of VMs the server is
	// trying to create.
	CurrentAmount        int32    `protobuf:"varint,8,opt,name=current_amount,json=currentAmount,proto3" json:"current_amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A config for one type of VM.

func (*Config) ComputeAmount

func (cfg *Config) ComputeAmount(proposed int32, now time.Time) (int32, error)

ComputeAmount returns the amount to use given the proposed amount and time. Assumes this config has been validated.

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) FromProperty

func (cfg *Config) FromProperty(p datastore.Property) error

FromProperty implements datastore.PropertyConverter.

func (*Config) GetAmount

func (m *Config) GetAmount() *Amount

func (*Config) GetAttributes

func (m *Config) GetAttributes() *VM

func (*Config) GetCurrentAmount

func (m *Config) GetCurrentAmount() int32

func (*Config) GetLifetime

func (m *Config) GetLifetime() *TimePeriod

func (*Config) GetOwner

func (m *Config) GetOwner() []string

func (*Config) GetPrefix

func (m *Config) GetPrefix() string

func (*Config) GetRevision

func (m *Config) GetRevision() string

func (*Config) GetSwarming

func (m *Config) GetSwarming() string

func (*Config) GetTimeout

func (m *Config) GetTimeout() *TimePeriod

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) ToProperty

func (cfg *Config) ToProperty() (datastore.Property, error)

ToProperty implements datastore.PropertyConverter.

func (*Config) Validate

func (cfg *Config) Validate(c *validation.Context)

Validate validates this config.

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type Configs

type Configs struct {
	// The configs for different types of VMs.
	Vms                  []*Config `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

A config for several types of VMs.

func (*Configs) Descriptor

func (*Configs) Descriptor() ([]byte, []int)

func (*Configs) GetVms

func (m *Configs) GetVms() []*Config

func (*Configs) ProtoMessage

func (*Configs) ProtoMessage()

func (*Configs) Reset

func (m *Configs) Reset()

func (*Configs) String

func (m *Configs) String() string

func (*Configs) Validate

func (cfgs *Configs) Validate(c *validation.Context)

Validate validates these configs.

func (*Configs) XXX_DiscardUnknown

func (m *Configs) XXX_DiscardUnknown()

func (*Configs) XXX_Marshal

func (m *Configs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Configs) XXX_Merge

func (m *Configs) XXX_Merge(src proto.Message)

func (*Configs) XXX_Size

func (m *Configs) XXX_Size() int

func (*Configs) XXX_Unmarshal

func (m *Configs) XXX_Unmarshal(b []byte) error

type ConfigurationClient

type ConfigurationClient interface {
	// Delete deletes a config.
	// Internal API.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Ensure ensures a config exists.
	// Creates a new config or updates an existing one as necessary.
	// Internal API.
	Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*Config, error)
	// Get returns an existing config.
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Config, error)
	// List returns existing configs.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// Update updates a config.
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Config, error)
}

ConfigurationClient is the client API for Configuration service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewConfigurationPRPCClient

func NewConfigurationPRPCClient(client *prpc.Client) ConfigurationClient

type ConfigurationServer

type ConfigurationServer interface {
	// Delete deletes a config.
	// Internal API.
	Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
	// Ensure ensures a config exists.
	// Creates a new config or updates an existing one as necessary.
	// Internal API.
	Ensure(context.Context, *EnsureRequest) (*Config, error)
	// Get returns an existing config.
	Get(context.Context, *GetRequest) (*Config, error)
	// List returns existing configs.
	List(context.Context, *ListRequest) (*ListResponse, error)
	// Update updates a config.
	Update(context.Context, *UpdateRequest) (*Config, error)
}

ConfigurationServer is the server API for Configuration service.

type DecoratedConfiguration

type DecoratedConfiguration struct {
	// Service is the service to decorate.
	Service ConfigurationServer
	// Prelude is called for each method before forwarding the call to Service.
	// If Prelude returns an error, then the call is skipped and the error is
	// processed via the Postlude (if one is defined), or it is returned directly.
	Prelude func(ctx context.Context, methodName string, req proto.Message) (context.Context, error)
	// Postlude is called for each method after Service has processed the call, or
	// after the Prelude has returned an error. This takes the the Service's
	// response proto (which may be nil) and/or any error. The decorated
	// service will return the response (possibly mutated) and error that Postlude
	// returns.
	Postlude func(ctx context.Context, methodName string, rsp proto.Message, err error) error
}

func (*DecoratedConfiguration) Delete

func (s *DecoratedConfiguration) Delete(ctx context.Context, req *DeleteRequest) (rsp *empty.Empty, err error)

func (*DecoratedConfiguration) Ensure

func (s *DecoratedConfiguration) Ensure(ctx context.Context, req *EnsureRequest) (rsp *Config, err error)

func (*DecoratedConfiguration) Get

func (s *DecoratedConfiguration) Get(ctx context.Context, req *GetRequest) (rsp *Config, err error)

func (*DecoratedConfiguration) List

func (s *DecoratedConfiguration) List(ctx context.Context, req *ListRequest) (rsp *ListResponse, err error)

func (*DecoratedConfiguration) Update

func (s *DecoratedConfiguration) Update(ctx context.Context, req *UpdateRequest) (rsp *Config, err error)

type DeleteRequest

type DeleteRequest struct {
	// The id of the config to delete.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A request to delete a config.

func (*DeleteRequest) Descriptor

func (*DeleteRequest) Descriptor() ([]byte, []int)

func (*DeleteRequest) GetId

func (m *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal

func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteRequest) XXX_Merge

func (m *DeleteRequest) XXX_Merge(src proto.Message)

func (*DeleteRequest) XXX_Size

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal

func (m *DeleteRequest) XXX_Unmarshal(b []byte) error

type Disk

type Disk struct {
	// The name of an image to use to create this disk.
	// https://cloud.google.com/compute/docs/reference/rest/v1/images/list.
	Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// The size of this disk in GiB.
	Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// The name of a disk type to use for this disk.
	// https://cloud.google.com/compute/docs/reference/rest/v1/diskTypes/list.
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// The disk interface to use for attaching this disk.
	Interface            DiskInterface `protobuf:"varint,4,opt,name=interface,proto3,enum=config.DiskInterface" json:"interface,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

A description of a disk. https://cloud.google.com/compute/docs/reference/rest/v1/disks.

func (*Disk) Descriptor

func (*Disk) Descriptor() ([]byte, []int)

func (*Disk) GetImage

func (m *Disk) GetImage() string

func (*Disk) GetImageBase

func (d *Disk) GetImageBase() string

GetImageBase returns the base image name for this validated disk.

func (*Disk) GetInterface

func (m *Disk) GetInterface() DiskInterface

func (*Disk) GetSize

func (m *Disk) GetSize() int64

func (*Disk) GetType

func (m *Disk) GetType() string

func (*Disk) IsPersistentDisk

func (d *Disk) IsPersistentDisk() bool

IsPersistentDisk returns whether or not the given string is a persistent disk type.

func (*Disk) IsScratchDisk

func (d *Disk) IsScratchDisk() bool

IsScratchDisk returns whether or not the given string is a scratch disk type.

func (*Disk) ProtoMessage

func (*Disk) ProtoMessage()

func (*Disk) Reset

func (m *Disk) Reset()

func (*Disk) String

func (m *Disk) String() string

func (*Disk) Validate

func (d *Disk) Validate(c *validation.Context)

Validate validates this disk.

The set of valid configurations is:
+-------------+-------+-----------+
| Type        | Image | Interface |
+-------------+-------+-----------+
| local-ssd   | No    | *         |
| pd-ssd      | Yes   | SCSI      |
| pd-standard | Yes   | SCSI      |
+-------------+-------+-----------+

func (*Disk) XXX_DiscardUnknown

func (m *Disk) XXX_DiscardUnknown()

func (*Disk) XXX_Marshal

func (m *Disk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Disk) XXX_Merge

func (m *Disk) XXX_Merge(src proto.Message)

func (*Disk) XXX_Size

func (m *Disk) XXX_Size() int

func (*Disk) XXX_Unmarshal

func (m *Disk) XXX_Unmarshal(b []byte) error

type DiskInterface

type DiskInterface int32

A disk interface. GCE's default is "SCSI".

const (
	DiskInterface_SCSI DiskInterface = 0
	DiskInterface_NVME DiskInterface = 1
)

func (DiskInterface) EnumDescriptor

func (DiskInterface) EnumDescriptor() ([]byte, []int)

func (DiskInterface) String

func (x DiskInterface) String() string

type EnsureRequest

type EnsureRequest struct {
	// The id of the config to ensure.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The config.
	Config               *Config  `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A request to create or update a config.

func (*EnsureRequest) Descriptor

func (*EnsureRequest) Descriptor() ([]byte, []int)

func (*EnsureRequest) GetConfig

func (m *EnsureRequest) GetConfig() *Config

func (*EnsureRequest) GetId

func (m *EnsureRequest) GetId() string

func (*EnsureRequest) ProtoMessage

func (*EnsureRequest) ProtoMessage()

func (*EnsureRequest) Reset

func (m *EnsureRequest) Reset()

func (*EnsureRequest) String

func (m *EnsureRequest) String() string

func (*EnsureRequest) XXX_DiscardUnknown

func (m *EnsureRequest) XXX_DiscardUnknown()

func (*EnsureRequest) XXX_Marshal

func (m *EnsureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EnsureRequest) XXX_Merge

func (m *EnsureRequest) XXX_Merge(src proto.Message)

func (*EnsureRequest) XXX_Size

func (m *EnsureRequest) XXX_Size() int

func (*EnsureRequest) XXX_Unmarshal

func (m *EnsureRequest) XXX_Unmarshal(b []byte) error

type GetRequest

type GetRequest struct {
	// The id of the config to get.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A request to get an existing config.

func (*GetRequest) Descriptor

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetId

func (m *GetRequest) GetId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type ListRequest

type ListRequest struct {
	// The value of next_page_token received in a ListResponse. Used to get the
	// next page of configs. If empty, gets the first page.
	PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// The maximum number of results to include in the response.
	PageSize             int32    `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A request to list existing configs.

func (*ListRequest) Descriptor

func (*ListRequest) Descriptor() ([]byte, []int)

func (*ListRequest) GetPageSize

func (m *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken

func (m *ListRequest) GetPageToken() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRequest) XXX_Merge

func (m *ListRequest) XXX_Merge(src proto.Message)

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

func (m *ListRequest) XXX_Unmarshal(b []byte) error

type ListResponse

type ListResponse struct {
	// The configs.
	Configs []*Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"`
	// The value to use as the page_token in a ListRequest to get the next page of
	// configs. If empty, there are no more configs.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A response to a request to list configs.

func (*ListResponse) Descriptor

func (*ListResponse) Descriptor() ([]byte, []int)

func (*ListResponse) GetConfigs

func (m *ListResponse) GetConfigs() []*Config

func (*ListResponse) GetNextPageToken

func (m *ListResponse) GetNextPageToken() string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) String

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal

func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListResponse) XXX_Merge

func (m *ListResponse) XXX_Merge(src proto.Message)

func (*ListResponse) XXX_Size

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal

func (m *ListResponse) XXX_Unmarshal(b []byte) error

type Metadata

type Metadata struct {
	// Types that are valid to be assigned to Metadata:
	//	*Metadata_FromText
	//	*Metadata_FromFile
	Metadata             isMetadata_Metadata `protobuf_oneof:"metadata"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

A description of instance metadata.

func (*Metadata) Descriptor

func (*Metadata) Descriptor() ([]byte, []int)

func (*Metadata) GetFromFile

func (m *Metadata) GetFromFile() string

func (*Metadata) GetFromText

func (m *Metadata) GetFromText() string

func (*Metadata) GetMetadata

func (m *Metadata) GetMetadata() isMetadata_Metadata

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (m *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_OneofWrappers

func (*Metadata) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

type Metadata_FromFile

type Metadata_FromFile struct {
	FromFile string `protobuf:"bytes,2,opt,name=from_file,json=fromFile,proto3,oneof"`
}

type Metadata_FromText

type Metadata_FromText struct {
	FromText string `protobuf:"bytes,1,opt,name=from_text,json=fromText,proto3,oneof"`
}

type NetworkInterface

type NetworkInterface struct {
	// The access configurations for this interface.
	// Required to enable external internet access.
	AccessConfig []*AccessConfig `protobuf:"bytes,1,rep,name=access_config,json=accessConfig,proto3" json:"access_config,omitempty"`
	// The name of a network to use for this interface.
	// https://cloud.google.com/compute/docs/reference/rest/v1/networks/list.
	Network              string   `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A description of a network interface.

func (*NetworkInterface) Descriptor

func (*NetworkInterface) Descriptor() ([]byte, []int)

func (*NetworkInterface) GetAccessConfig

func (m *NetworkInterface) GetAccessConfig() []*AccessConfig

func (*NetworkInterface) GetNetwork

func (m *NetworkInterface) GetNetwork() string

func (*NetworkInterface) ProtoMessage

func (*NetworkInterface) ProtoMessage()

func (*NetworkInterface) Reset

func (m *NetworkInterface) Reset()

func (*NetworkInterface) String

func (m *NetworkInterface) String() string

func (*NetworkInterface) XXX_DiscardUnknown

func (m *NetworkInterface) XXX_DiscardUnknown()

func (*NetworkInterface) XXX_Marshal

func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NetworkInterface) XXX_Merge

func (m *NetworkInterface) XXX_Merge(src proto.Message)

func (*NetworkInterface) XXX_Size

func (m *NetworkInterface) XXX_Size() int

func (*NetworkInterface) XXX_Unmarshal

func (m *NetworkInterface) XXX_Unmarshal(b []byte) error

type Schedule

type Schedule struct {
	// The length of time the amount is in effect.
	// With start, this creates a half-open interval.
	// During [start, start+length) the amount will apply.
	Length *TimePeriod `protobuf:"bytes,2,opt,name=length,proto3" json:"length,omitempty"`
	// The start times when this amount goes into effect.
	Start *TimeOfDay `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"`
	// The minimum amount of VMs allowed.
	Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
	// The maximum amount of VMs allowed.
	Max                  int32    `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

An amount of VMs for particular days of the week.

func (*Schedule) Descriptor

func (*Schedule) Descriptor() ([]byte, []int)

func (*Schedule) GetLength

func (m *Schedule) GetLength() *TimePeriod

func (*Schedule) GetMax

func (m *Schedule) GetMax() int32

func (*Schedule) GetMin

func (m *Schedule) GetMin() int32

func (*Schedule) GetStart

func (m *Schedule) GetStart() *TimeOfDay

func (*Schedule) ProtoMessage

func (*Schedule) ProtoMessage()

func (*Schedule) Reset

func (m *Schedule) Reset()

func (*Schedule) String

func (m *Schedule) String() string

func (*Schedule) Validate

func (s *Schedule) Validate(c *validation.Context)

Validate validates this schedule.

func (*Schedule) XXX_DiscardUnknown

func (m *Schedule) XXX_DiscardUnknown()

func (*Schedule) XXX_Marshal

func (m *Schedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Schedule) XXX_Merge

func (m *Schedule) XXX_Merge(src proto.Message)

func (*Schedule) XXX_Size

func (m *Schedule) XXX_Size() int

func (*Schedule) XXX_Unmarshal

func (m *Schedule) XXX_Unmarshal(b []byte) error

type ServiceAccount

type ServiceAccount struct {
	// The email address of this service account.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// The scopes available for this service account.
	Scope                []string `protobuf:"bytes,2,rep,name=scope,proto3" json:"scope,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A description of a service account.

func (*ServiceAccount) Descriptor

func (*ServiceAccount) Descriptor() ([]byte, []int)

func (*ServiceAccount) GetEmail

func (m *ServiceAccount) GetEmail() string

func (*ServiceAccount) GetScope

func (m *ServiceAccount) GetScope() []string

func (*ServiceAccount) ProtoMessage

func (*ServiceAccount) ProtoMessage()

func (*ServiceAccount) Reset

func (m *ServiceAccount) Reset()

func (*ServiceAccount) String

func (m *ServiceAccount) String() string

func (*ServiceAccount) XXX_DiscardUnknown

func (m *ServiceAccount) XXX_DiscardUnknown()

func (*ServiceAccount) XXX_Marshal

func (m *ServiceAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceAccount) XXX_Merge

func (m *ServiceAccount) XXX_Merge(src proto.Message)

func (*ServiceAccount) XXX_Size

func (m *ServiceAccount) XXX_Size() int

func (*ServiceAccount) XXX_Unmarshal

func (m *ServiceAccount) XXX_Unmarshal(b []byte) error

type TimeOfDay

type TimeOfDay struct {
	// The day of the week the time applies to.
	Day dayofweek.DayOfWeek `protobuf:"varint,1,opt,name=day,proto3,enum=google.type.DayOfWeek" json:"day,omitempty"`
	// The location the time should be interpreted in.
	// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
	Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// The time in 24-hour <hour>:<minute>.
	Time                 string   `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A time of day.

func (*TimeOfDay) Descriptor

func (*TimeOfDay) Descriptor() ([]byte, []int)

func (*TimeOfDay) GetDay

func (m *TimeOfDay) GetDay() dayofweek.DayOfWeek

func (*TimeOfDay) GetLocation

func (m *TimeOfDay) GetLocation() string

func (*TimeOfDay) GetTime

func (m *TimeOfDay) GetTime() string

func (*TimeOfDay) ProtoMessage

func (*TimeOfDay) ProtoMessage()

func (*TimeOfDay) Reset

func (m *TimeOfDay) Reset()

func (*TimeOfDay) String

func (m *TimeOfDay) String() string

func (*TimeOfDay) Validate

func (t *TimeOfDay) Validate(c *validation.Context)

Validate validates this time of day.

func (*TimeOfDay) XXX_DiscardUnknown

func (m *TimeOfDay) XXX_DiscardUnknown()

func (*TimeOfDay) XXX_Marshal

func (m *TimeOfDay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeOfDay) XXX_Merge

func (m *TimeOfDay) XXX_Merge(src proto.Message)

func (*TimeOfDay) XXX_Size

func (m *TimeOfDay) XXX_Size() int

func (*TimeOfDay) XXX_Unmarshal

func (m *TimeOfDay) XXX_Unmarshal(b []byte) error

type TimePeriod

type TimePeriod struct {
	// Types that are valid to be assigned to Time:
	//	*TimePeriod_Duration
	//	*TimePeriod_Seconds
	Time                 isTimePeriod_Time `protobuf_oneof:"time"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

A length of time.

func (*TimePeriod) Descriptor

func (*TimePeriod) Descriptor() ([]byte, []int)

func (*TimePeriod) GetDuration

func (m *TimePeriod) GetDuration() string

func (*TimePeriod) GetSeconds

func (m *TimePeriod) GetSeconds() int64

func (*TimePeriod) GetTime

func (m *TimePeriod) GetTime() isTimePeriod_Time

func (*TimePeriod) Normalize

func (t *TimePeriod) Normalize() error

Normalize ensures this time period is in seconds. Parses and converts duration to seconds if necessary.

func (*TimePeriod) ProtoMessage

func (*TimePeriod) ProtoMessage()

func (*TimePeriod) Reset

func (m *TimePeriod) Reset()

func (*TimePeriod) String

func (m *TimePeriod) String() string

func (*TimePeriod) ToSeconds

func (t *TimePeriod) ToSeconds() (int64, error)

ToSeconds returns this time period in seconds. Clamps to math.MaxInt64.

func (*TimePeriod) Validate

func (t *TimePeriod) Validate(c *validation.Context)

Validate validates this time period.

func (*TimePeriod) XXX_DiscardUnknown

func (m *TimePeriod) XXX_DiscardUnknown()

func (*TimePeriod) XXX_Marshal

func (m *TimePeriod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimePeriod) XXX_Merge

func (m *TimePeriod) XXX_Merge(src proto.Message)

func (*TimePeriod) XXX_OneofWrappers

func (*TimePeriod) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*TimePeriod) XXX_Size

func (m *TimePeriod) XXX_Size() int

func (*TimePeriod) XXX_Unmarshal

func (m *TimePeriod) XXX_Unmarshal(b []byte) error

type TimePeriod_Duration

type TimePeriod_Duration struct {
	Duration string `protobuf:"bytes,1,opt,name=duration,proto3,oneof"`
}

func (*TimePeriod_Duration) ToSeconds

func (d *TimePeriod_Duration) ToSeconds() (int64, error)

ToSeconds returns this duration in seconds. Clamps to math.MaxInt64.

func (*TimePeriod_Duration) Validate

func (d *TimePeriod_Duration) Validate(c *validation.Context)

Validate validates this duration.

type TimePeriod_Seconds

type TimePeriod_Seconds struct {
	Seconds int64 `protobuf:"varint,2,opt,name=seconds,proto3,oneof"`
}

type UnimplementedConfigurationServer

type UnimplementedConfigurationServer struct {
}

UnimplementedConfigurationServer can be embedded to have forward compatible implementations.

func (*UnimplementedConfigurationServer) Delete

func (*UnimplementedConfigurationServer) Ensure

func (*UnimplementedConfigurationServer) Get

func (*UnimplementedConfigurationServer) List

func (*UnimplementedConfigurationServer) Update

type UpdateRequest

type UpdateRequest struct {
	// The id of the config to update.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The config.
	Config *Config `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// The fields to update. Only config.current_amount may be updated.
	UpdateMask           *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

A request to update an existing config.

func (*UpdateRequest) Descriptor

func (*UpdateRequest) Descriptor() ([]byte, []int)

func (*UpdateRequest) GetConfig

func (m *UpdateRequest) GetConfig() *Config

func (*UpdateRequest) GetId

func (m *UpdateRequest) GetId() string

func (*UpdateRequest) GetUpdateMask

func (m *UpdateRequest) GetUpdateMask() *field_mask.FieldMask

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

func (*UpdateRequest) XXX_DiscardUnknown

func (m *UpdateRequest) XXX_DiscardUnknown()

func (*UpdateRequest) XXX_Marshal

func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateRequest) XXX_Merge

func (m *UpdateRequest) XXX_Merge(src proto.Message)

func (*UpdateRequest) XXX_Size

func (m *UpdateRequest) XXX_Size() int

func (*UpdateRequest) XXX_Unmarshal

func (m *UpdateRequest) XXX_Unmarshal(b []byte) error

type VM

type VM struct {
	// The disks to attach to this VM.
	Disk []*Disk `protobuf:"bytes,1,rep,name=disk,proto3" json:"disk,omitempty"`
	// The name of a machine type to use for this VM.
	// https://cloud.google.com/compute/docs/reference/rest/v1/machineTypes/list.
	MachineType string `protobuf:"bytes,2,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"`
	// The metadata to attach to this VM.
	Metadata []*Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// The minimum CPU platform to use for this VM.
	// https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
	MinCpuPlatform string `protobuf:"bytes,4,opt,name=min_cpu_platform,json=minCpuPlatform,proto3" json:"min_cpu_platform,omitempty"`
	// The network interfaces to configure for this VM.
	NetworkInterface []*NetworkInterface `protobuf:"bytes,5,rep,name=network_interface,json=networkInterface,proto3" json:"network_interface,omitempty"`
	// The name of a GCP project to create this VM in.
	Project string `protobuf:"bytes,6,opt,name=project,proto3" json:"project,omitempty"`
	// The service accounts to make available to this VM.
	ServiceAccount []*ServiceAccount `protobuf:"bytes,7,rep,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`
	// The tags to attach to this VM.
	Tag []string `protobuf:"bytes,8,rep,name=tag,proto3" json:"tag,omitempty"`
	// The name of a zone to create this VM in.
	// https://cloud.google.com/compute/docs/reference/rest/v1/zones/list.
	Zone                 string   `protobuf:"bytes,9,opt,name=zone,proto3" json:"zone,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A description of a VM. https://cloud.google.com/compute/docs/reference/rest/v1/instances.

func (*VM) Descriptor

func (*VM) Descriptor() ([]byte, []int)

func (*VM) FromProperty

func (v *VM) FromProperty(p datastore.Property) error

FromProperty implements datastore.PropertyConverter.

func (*VM) GetDisk

func (m *VM) GetDisk() []*Disk

func (*VM) GetMachineType

func (m *VM) GetMachineType() string

func (*VM) GetMetadata

func (m *VM) GetMetadata() []*Metadata

func (*VM) GetMinCpuPlatform

func (m *VM) GetMinCpuPlatform() string

func (*VM) GetNetworkInterface

func (m *VM) GetNetworkInterface() []*NetworkInterface

func (*VM) GetProject

func (m *VM) GetProject() string

func (*VM) GetServiceAccount

func (m *VM) GetServiceAccount() []*ServiceAccount

func (*VM) GetTag

func (m *VM) GetTag() []string

func (*VM) GetZone

func (m *VM) GetZone() string

func (*VM) ProtoMessage

func (*VM) ProtoMessage()

func (*VM) Reset

func (m *VM) Reset()

func (*VM) SetZone

func (v *VM) SetZone(zone string)

SetZone sets the given zone throughout this VM.

func (*VM) String

func (m *VM) String() string

func (*VM) ToProperty

func (v *VM) ToProperty() (datastore.Property, error)

ToProperty implements datastore.PropertyConverter.

func (*VM) Validate

func (v *VM) Validate(c *validation.Context)

Validate validates this VM description. Metadata FromFile must already be converted to FromText.

func (*VM) XXX_DiscardUnknown

func (m *VM) XXX_DiscardUnknown()

func (*VM) XXX_Marshal

func (m *VM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VM) XXX_Merge

func (m *VM) XXX_Merge(src proto.Message)

func (*VM) XXX_Size

func (m *VM) XXX_Size() int

func (*VM) XXX_Unmarshal

func (m *VM) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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