config

package
v0.0.0-...-1f88c41 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 26 Imported by: 14

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",
	}
	AccessConfigType_value = map[string]int32{
		"ONE_TO_ONE_NAT": 0,
	}
)

Enum value maps for AccessConfigType.

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

Enum value maps for DiskInterface.

View Source
var (
	NodeAffinityOperator_name = map[int32]string{
		0: "OPERATOR_UNSPECIFIED",
		1: "IN",
		2: "NOT_IN",
	}
	NodeAffinityOperator_value = map[string]int32{
		"OPERATOR_UNSPECIFIED": 0,
		"IN":                   1,
		"NOT_IN":               2,
	}
)

Enum value maps for NodeAffinityOperator.

View Source
var (
	GCPChannel_name = map[int32]string{
		0: "GCP_CHANNEL_UNSPECIFIED",
		1: "GCP_CHANNEL_STABLE",
		2: "GCP_CHANNEL_BETA",
		3: "GCP_CHANNEL_ALPHA",
	}
	GCPChannel_value = map[string]int32{
		"GCP_CHANNEL_UNSPECIFIED": 0,
		"GCP_CHANNEL_STABLE":      1,
		"GCP_CHANNEL_BETA":        2,
		"GCP_CHANNEL_ALPHA":       3,
	}
)

Enum value maps for GCPChannel.

View Source
var (
	PerformanceMonitoringUnit_name = map[int32]string{
		0: "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED",
		1: "ARCHITECTURAL",
		2: "ENHANCED",
		3: "STANDARD",
	}
	PerformanceMonitoringUnit_value = map[string]int32{
		"PERFORMANCE_MONITORING_UNIT_UNSPECIFIED": 0,
		"ARCHITECTURAL": 1,
		"ENHANCED":      2,
		"STANDARD":      3,
	}
)

Enum value maps for PerformanceMonitoringUnit.

View Source
var File_go_chromium_org_luci_gce_api_config_v1_config_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_gce_api_config_v1_service_proto protoreflect.FileDescriptor

Functions

func FileDescriptorSet

func FileDescriptorSet() *descriptorpb.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"`
	// contains filtered or unexported fields
}

A description of a network access config.

func (*AccessConfig) Descriptor deprecated

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

Deprecated: Use AccessConfig.ProtoReflect.Descriptor instead.

func (*AccessConfig) GetType

func (x *AccessConfig) GetType() AccessConfigType

func (*AccessConfig) ProtoMessage

func (*AccessConfig) ProtoMessage()

func (*AccessConfig) ProtoReflect

func (x *AccessConfig) ProtoReflect() protoreflect.Message

func (*AccessConfig) Reset

func (x *AccessConfig) Reset()

func (*AccessConfig) String

func (x *AccessConfig) String() string

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) Descriptor

func (AccessConfigType) Enum

func (AccessConfigType) EnumDescriptor deprecated

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

Deprecated: Use AccessConfigType.Descriptor instead.

func (AccessConfigType) Number

func (AccessConfigType) String

func (x AccessConfigType) String() string

func (AccessConfigType) Type

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"`
	// contains filtered or unexported fields
}

An amount of VMs.

func (*Amount) Descriptor deprecated

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

Deprecated: Use Amount.ProtoReflect.Descriptor instead.

func (*Amount) GetChange

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

func (*Amount) GetMax

func (x *Amount) GetMax() int32

func (*Amount) GetMin

func (x *Amount) GetMin() int32

func (*Amount) ProtoMessage

func (*Amount) ProtoMessage()

func (*Amount) ProtoReflect

func (x *Amount) ProtoReflect() protoreflect.Message

func (*Amount) Reset

func (x *Amount) Reset()

func (*Amount) String

func (x *Amount) String() string

func (*Amount) Validate

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

Validate validates this amount.

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. But it
	// won't happen immediately becasuse of scheduling reasons. The delay varies
	// based on the specified lifetime.
	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"`
	// Set of VMs to be created.
	// Each VM represent a DUT.
	// Optional. Updated dynamically via RPC.
	// TODO(b/318715067): Remove once Device Manager is ready.
	Duts map[string]*emptypb.Empty `` /* 150-byte string literal not displayed */
	// 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"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) FromProperty

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

FromProperty implements datastore.PropertyConverter.

func (*Config) GetAmount

func (x *Config) GetAmount() *Amount

func (*Config) GetAttributes

func (x *Config) GetAttributes() *VM

func (*Config) GetCurrentAmount

func (x *Config) GetCurrentAmount() int32

func (*Config) GetDuts

func (x *Config) GetDuts() map[string]*emptypb.Empty

func (*Config) GetLifetime

func (x *Config) GetLifetime() *TimePeriod

func (*Config) GetOwner

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

func (*Config) GetPrefix

func (x *Config) GetPrefix() string

func (*Config) GetRevision

func (x *Config) GetRevision() string

func (*Config) GetSwarming

func (x *Config) GetSwarming() string

func (*Config) GetTimeout

func (x *Config) GetTimeout() *TimePeriod

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *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.

type Configs

type Configs struct {

	// The configs for different types of VMs.
	Vms []*Config `protobuf:"bytes,1,rep,name=vms,proto3" json:"vms,omitempty"`
	// contains filtered or unexported fields
}

A config for several types of VMs.

func (*Configs) Descriptor deprecated

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

Deprecated: Use Configs.ProtoReflect.Descriptor instead.

func (*Configs) GetVms

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

func (*Configs) ProtoMessage

func (*Configs) ProtoMessage()

func (*Configs) ProtoReflect

func (x *Configs) ProtoReflect() protoreflect.Message

func (*Configs) Reset

func (x *Configs) Reset()

func (*Configs) String

func (x *Configs) String() string

func (*Configs) Validate

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

Validate validates these configs.

type ConfigurationClient

type ConfigurationClient interface {
	// Delete deletes a config.
	// Internal API.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.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) (*emptypb.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 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 *emptypb.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"`
	// contains filtered or unexported fields
}

A request to delete a config.

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*Disk) Descriptor deprecated

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

Deprecated: Use Disk.ProtoReflect.Descriptor instead.

func (*Disk) GetImage

func (x *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 (x *Disk) GetInterface() DiskInterface

func (*Disk) GetSize

func (x *Disk) GetSize() int64

func (*Disk) GetType

func (x *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) ProtoReflect

func (x *Disk) ProtoReflect() protoreflect.Message

func (*Disk) Reset

func (x *Disk) Reset()

func (*Disk) String

func (x *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      |
+-------------+-------+-----------+

type DiskInterface

type DiskInterface int32

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

const (
	DiskInterface_SCSI DiskInterface = 0
	DiskInterface_NVME DiskInterface = 1
)

func (DiskInterface) Descriptor

func (DiskInterface) Enum

func (x DiskInterface) Enum() *DiskInterface

func (DiskInterface) EnumDescriptor deprecated

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

Deprecated: Use DiskInterface.Descriptor instead.

func (DiskInterface) Number

func (DiskInterface) String

func (x DiskInterface) String() string

func (DiskInterface) Type

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"`
	// contains filtered or unexported fields
}

A request to create or update a config.

func (*EnsureRequest) Descriptor deprecated

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

Deprecated: Use EnsureRequest.ProtoReflect.Descriptor instead.

func (*EnsureRequest) GetConfig

func (x *EnsureRequest) GetConfig() *Config

func (*EnsureRequest) GetId

func (x *EnsureRequest) GetId() string

func (*EnsureRequest) ProtoMessage

func (*EnsureRequest) ProtoMessage()

func (*EnsureRequest) ProtoReflect

func (x *EnsureRequest) ProtoReflect() protoreflect.Message

func (*EnsureRequest) Reset

func (x *EnsureRequest) Reset()

func (*EnsureRequest) String

func (x *EnsureRequest) String() string

type GCPChannel

type GCPChannel int32

GCPChannel is the version of the cloud API to use stable, beta, or alpha.

const (
	GCPChannel_GCP_CHANNEL_UNSPECIFIED GCPChannel = 0
	GCPChannel_GCP_CHANNEL_STABLE      GCPChannel = 1
	GCPChannel_GCP_CHANNEL_BETA        GCPChannel = 2
	GCPChannel_GCP_CHANNEL_ALPHA       GCPChannel = 3
)

func (GCPChannel) Descriptor

func (GCPChannel) Descriptor() protoreflect.EnumDescriptor

func (GCPChannel) Enum

func (x GCPChannel) Enum() *GCPChannel

func (GCPChannel) EnumDescriptor deprecated

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

Deprecated: Use GCPChannel.Descriptor instead.

func (GCPChannel) Number

func (x GCPChannel) Number() protoreflect.EnumNumber

func (GCPChannel) String

func (x GCPChannel) String() string

func (GCPChannel) Type

type GetRequest

type GetRequest struct {

	// The id of the config to get.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

A request to get an existing config.

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

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"`
	// contains filtered or unexported fields
}

A request to list existing configs.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetPageSize

func (x *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken

func (x *ListRequest) GetPageToken() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

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"`
	// contains filtered or unexported fields
}

A response to a request to list configs.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetConfigs

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

func (*ListResponse) GetNextPageToken

func (x *ListResponse) GetNextPageToken() string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Metadata

type Metadata struct {

	// Types that are assignable to Metadata:
	//
	//	*Metadata_FromText
	//	*Metadata_FromFile
	Metadata isMetadata_Metadata `protobuf_oneof:"metadata"`
	// contains filtered or unexported fields
}

A description of instance metadata.

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetFromFile

func (x *Metadata) GetFromFile() string

func (*Metadata) GetFromText

func (x *Metadata) GetFromText() string

func (*Metadata) GetMetadata

func (m *Metadata) GetMetadata() isMetadata_Metadata

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type Metadata_FromFile

type Metadata_FromFile struct {
	// A string of the form "key:filename".
	// The contents of the file are used as the value for one item of metadata.
	FromFile string `protobuf:"bytes,2,opt,name=from_file,json=fromFile,proto3,oneof"`
}

type Metadata_FromText

type Metadata_FromText struct {
	// A string of the form "key:value" to use as one item of metadata.
	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"`
	// The name of a network to use for this interface.
	// https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks/list.
	// Example: regions/us-west2/subnetworks/cloudbots-network-us-west2.
	Subnetwork string `protobuf:"bytes,3,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"`
	// contains filtered or unexported fields
}

A description of a network interface.

func (*NetworkInterface) Descriptor deprecated

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

Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead.

func (*NetworkInterface) GetAccessConfig

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

func (*NetworkInterface) GetNetwork

func (x *NetworkInterface) GetNetwork() string

func (*NetworkInterface) GetSubnetwork

func (x *NetworkInterface) GetSubnetwork() string

func (*NetworkInterface) ProtoMessage

func (*NetworkInterface) ProtoMessage()

func (*NetworkInterface) ProtoReflect

func (x *NetworkInterface) ProtoReflect() protoreflect.Message

func (*NetworkInterface) Reset

func (x *NetworkInterface) Reset()

func (*NetworkInterface) String

func (x *NetworkInterface) String() string

type NodeAffinity

type NodeAffinity struct {

	// Corresponds to the label key of Node resource.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Defines the operation of node selection.
	Operator NodeAffinityOperator `protobuf:"varint,2,opt,name=operator,proto3,enum=config.NodeAffinityOperator" json:"operator,omitempty"`
	// Corresponds to the label values of Node resource.
	Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

A description of nodes onto which an instance may be scheduled.

func (*NodeAffinity) Descriptor deprecated

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

Deprecated: Use NodeAffinity.ProtoReflect.Descriptor instead.

func (*NodeAffinity) GetKey

func (x *NodeAffinity) GetKey() string

func (*NodeAffinity) GetOperator

func (x *NodeAffinity) GetOperator() NodeAffinityOperator

func (*NodeAffinity) GetValues

func (x *NodeAffinity) GetValues() []string

func (*NodeAffinity) ProtoMessage

func (*NodeAffinity) ProtoMessage()

func (*NodeAffinity) ProtoReflect

func (x *NodeAffinity) ProtoReflect() protoreflect.Message

func (*NodeAffinity) Reset

func (x *NodeAffinity) Reset()

func (*NodeAffinity) String

func (x *NodeAffinity) String() string

type NodeAffinityOperator

type NodeAffinityOperator int32

Defines the way in which nodes are selected.

const (
	NodeAffinityOperator_OPERATOR_UNSPECIFIED NodeAffinityOperator = 0
	// Requires Compute Engine to seek for matched nodes.
	NodeAffinityOperator_IN NodeAffinityOperator = 1
	// Requires Compute Engine to avoid certain nodes.
	NodeAffinityOperator_NOT_IN NodeAffinityOperator = 2
)

func (NodeAffinityOperator) Descriptor

func (NodeAffinityOperator) Enum

func (NodeAffinityOperator) EnumDescriptor deprecated

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

Deprecated: Use NodeAffinityOperator.Descriptor instead.

func (NodeAffinityOperator) Number

func (NodeAffinityOperator) String

func (x NodeAffinityOperator) String() string

func (NodeAffinityOperator) Type

type PerformanceMonitoringUnit

type PerformanceMonitoringUnit int32

PerformanceMonitoringUnit tracks the types of performance monitoring units to attach to a given instance.

const (
	PerformanceMonitoringUnit_PERFORMANCE_MONITORING_UNIT_UNSPECIFIED PerformanceMonitoringUnit = 0 // This is not a mistake! The underlying cloud API expects the string "PERFORMANCE_MONITORING_UNIT_UNSPECIFIED".
	PerformanceMonitoringUnit_ARCHITECTURAL                           PerformanceMonitoringUnit = 1
	PerformanceMonitoringUnit_ENHANCED                                PerformanceMonitoringUnit = 2
	PerformanceMonitoringUnit_STANDARD                                PerformanceMonitoringUnit = 3
)

func (PerformanceMonitoringUnit) Descriptor

func (PerformanceMonitoringUnit) Enum

func (PerformanceMonitoringUnit) EnumDescriptor deprecated

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

Deprecated: Use PerformanceMonitoringUnit.Descriptor instead.

func (PerformanceMonitoringUnit) Number

func (PerformanceMonitoringUnit) String

func (x PerformanceMonitoringUnit) String() string

func (PerformanceMonitoringUnit) Type

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"`
	// contains filtered or unexported fields
}

An amount of VMs for particular days of the week.

func (*Schedule) Descriptor deprecated

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

Deprecated: Use Schedule.ProtoReflect.Descriptor instead.

func (*Schedule) GetLength

func (x *Schedule) GetLength() *TimePeriod

func (*Schedule) GetMax

func (x *Schedule) GetMax() int32

func (*Schedule) GetMin

func (x *Schedule) GetMin() int32

func (*Schedule) GetStart

func (x *Schedule) GetStart() *TimeOfDay

func (*Schedule) ProtoMessage

func (*Schedule) ProtoMessage()

func (*Schedule) ProtoReflect

func (x *Schedule) ProtoReflect() protoreflect.Message

func (*Schedule) Reset

func (x *Schedule) Reset()

func (*Schedule) String

func (x *Schedule) String() string

func (*Schedule) Validate

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

Validate validates this schedule.

type Scheduling

type Scheduling struct {

	// A set of node affinity and anti-affinity configurations.
	// https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity
	NodeAffinity []*NodeAffinity `protobuf:"bytes,1,rep,name=node_affinity,json=nodeAffinity,proto3" json:"node_affinity,omitempty"`
	// contains filtered or unexported fields
}

A description of scheduling options for an instance.

func (*Scheduling) Descriptor deprecated

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

Deprecated: Use Scheduling.ProtoReflect.Descriptor instead.

func (*Scheduling) GetNodeAffinity

func (x *Scheduling) GetNodeAffinity() []*NodeAffinity

func (*Scheduling) ProtoMessage

func (*Scheduling) ProtoMessage()

func (*Scheduling) ProtoReflect

func (x *Scheduling) ProtoReflect() protoreflect.Message

func (*Scheduling) Reset

func (x *Scheduling) Reset()

func (*Scheduling) String

func (x *Scheduling) String() string

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"`
	// contains filtered or unexported fields
}

A description of a service account.

func (*ServiceAccount) Descriptor deprecated

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

Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.

func (*ServiceAccount) GetEmail

func (x *ServiceAccount) GetEmail() string

func (*ServiceAccount) GetScope

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

func (*ServiceAccount) ProtoMessage

func (*ServiceAccount) ProtoMessage()

func (*ServiceAccount) ProtoReflect

func (x *ServiceAccount) ProtoReflect() protoreflect.Message

func (*ServiceAccount) Reset

func (x *ServiceAccount) Reset()

func (*ServiceAccount) String

func (x *ServiceAccount) String() string

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"`
	// contains filtered or unexported fields
}

A time of day.

func (*TimeOfDay) Descriptor deprecated

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

Deprecated: Use TimeOfDay.ProtoReflect.Descriptor instead.

func (*TimeOfDay) GetDay

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

func (*TimeOfDay) GetLocation

func (x *TimeOfDay) GetLocation() string

func (*TimeOfDay) GetTime

func (x *TimeOfDay) GetTime() string

func (*TimeOfDay) ProtoMessage

func (*TimeOfDay) ProtoMessage()

func (*TimeOfDay) ProtoReflect

func (x *TimeOfDay) ProtoReflect() protoreflect.Message

func (*TimeOfDay) Reset

func (x *TimeOfDay) Reset()

func (*TimeOfDay) String

func (x *TimeOfDay) String() string

func (*TimeOfDay) Validate

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

Validate validates this time of day.

type TimePeriod

type TimePeriod struct {

	// Types that are assignable to Time:
	//
	//	*TimePeriod_Duration
	//	*TimePeriod_Seconds
	Time isTimePeriod_Time `protobuf_oneof:"time"`
	// contains filtered or unexported fields
}

A length of time.

func (*TimePeriod) Descriptor deprecated

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

Deprecated: Use TimePeriod.ProtoReflect.Descriptor instead.

func (*TimePeriod) GetDuration

func (x *TimePeriod) GetDuration() string

func (*TimePeriod) GetSeconds

func (x *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) ProtoReflect

func (x *TimePeriod) ProtoReflect() protoreflect.Message

func (*TimePeriod) Reset

func (x *TimePeriod) Reset()

func (*TimePeriod) String

func (x *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.

type TimePeriod_Duration

type TimePeriod_Duration struct {
	// The length of time in <int><unit> form.
	// Valid units are "s", "m", "h", "d", and "mo", meaning
	// "seconds", "minutes", "hours", "days", "months" respectively.
	// A "day" is shorthand for 24 hours.
	// A "month" is shorthand for 30 days.
	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 {
	// The length of time in seconds.
	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 and config.duts may be updated.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

A request to update an existing config.

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetConfig

func (x *UpdateRequest) GetConfig() *Config

func (*UpdateRequest) GetId

func (x *UpdateRequest) GetId() string

func (*UpdateRequest) GetUpdateMask

func (x *UpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

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"`
	// The scheduling options for this VM.
	Scheduling *Scheduling `protobuf:"bytes,10,opt,name=scheduling,proto3" json:"scheduling,omitempty"`
	// The labels to attach to this VM.
	Label map[string]string `` /* 152-byte string literal not displayed */
	// Whether to disable integrity monitoring for this VM.
	DisableIntegrityMonitoring bool `` /* 143-byte string literal not displayed */
	// Whether to enable secure boot for this VM.
	EnableSecureBoot bool `protobuf:"varint,13,opt,name=enable_secure_boot,json=enableSecureBoot,proto3" json:"enable_secure_boot,omitempty"`
	// Whether to disable vTPM for this VM.
	DisableVtpm bool `protobuf:"varint,14,opt,name=disable_vtpm,json=disableVtpm,proto3" json:"disable_vtpm,omitempty"`
	// Whether to enable Confidential Compute for this VM.
	EnableConfidentialCompute bool `` /* 140-byte string literal not displayed */
	// Force_send_fields is the list of all fields to force send in the GCP API.
	ForceSendFields []string `protobuf:"bytes,16,rep,name=force_send_fields,json=forceSendFields,proto3" json:"force_send_fields,omitempty"`
	// These are the fields associated with force_send_fields that are specifically null.
	NullFields []string `protobuf:"bytes,17,rep,name=null_fields,json=nullFields,proto3" json:"null_fields,omitempty"`
	// gcp_channel of the GCP api to use, e.g. stable or alpha.
	GcpChannel GCPChannel `protobuf:"varint,18,opt,name=gcp_channel,json=gcpChannel,proto3,enum=config.GCPChannel" json:"gcp_channel,omitempty"`
	// The performance monitoring unit is the type of performance monitoring unit.
	PerformanceMonitoringUnit PerformanceMonitoringUnit `` /* 178-byte string literal not displayed */
	// Ensure VMs are terminated if under maintenance.
	TerminateOnMaintenance bool `` /* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

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

func (*VM) Descriptor deprecated

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

Deprecated: Use VM.ProtoReflect.Descriptor instead.

func (*VM) FromProperty

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

FromProperty implements datastore.PropertyConverter.

func (*VM) GetDisableIntegrityMonitoring

func (x *VM) GetDisableIntegrityMonitoring() bool

func (*VM) GetDisableVtpm

func (x *VM) GetDisableVtpm() bool

func (*VM) GetDisk

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

func (*VM) GetEnableConfidentialCompute

func (x *VM) GetEnableConfidentialCompute() bool

func (*VM) GetEnableSecureBoot

func (x *VM) GetEnableSecureBoot() bool

func (*VM) GetForceSendFields

func (x *VM) GetForceSendFields() []string

func (*VM) GetGcpChannel

func (x *VM) GetGcpChannel() GCPChannel

func (*VM) GetLabel

func (x *VM) GetLabel() map[string]string

func (*VM) GetMachineType

func (x *VM) GetMachineType() string

func (*VM) GetMetadata

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

func (*VM) GetMinCpuPlatform

func (x *VM) GetMinCpuPlatform() string

func (*VM) GetNetworkInterface

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

func (*VM) GetNullFields

func (x *VM) GetNullFields() []string

func (*VM) GetPerformanceMonitoringUnit

func (x *VM) GetPerformanceMonitoringUnit() PerformanceMonitoringUnit

func (*VM) GetProject

func (x *VM) GetProject() string

func (*VM) GetScheduling

func (x *VM) GetScheduling() *Scheduling

func (*VM) GetServiceAccount

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

func (*VM) GetTag

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

func (*VM) GetTerminateOnMaintenance

func (x *VM) GetTerminateOnMaintenance() bool

func (*VM) GetZone

func (x *VM) GetZone() string

func (*VM) ProtoMessage

func (*VM) ProtoMessage()

func (*VM) ProtoReflect

func (x *VM) ProtoReflect() protoreflect.Message

func (*VM) Reset

func (x *VM) Reset()

func (*VM) SetZone

func (v *VM) SetZone(zone string)

SetZone sets the given zone throughout this VM.

func (*VM) String

func (x *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.

Jump to

Keyboard shortcuts

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