Documentation

Overview

    Package instances contains a GCE instances service.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    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 RegisterInstancesServer

      func RegisterInstancesServer(s prpc.Registrar, srv InstancesServer)

      Types

      type DecoratedInstances

      type DecoratedInstances struct {
      	// Service is the service to decorate.
      	Service InstancesServer
      	// 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 (*DecoratedInstances) Delete

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

      func (*DecoratedInstances) Get

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

      func (*DecoratedInstances) List

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

      type DeleteRequest

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

        A request to delete an instance.

        func (*DeleteRequest) Descriptor

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

        func (*DeleteRequest) GetHostname

        func (m *DeleteRequest) GetHostname() string

        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 image associated with 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"`
        	XXX_NoUnkeyedLiteral struct{} `json:"-"`
        	XXX_unrecognized     []byte   `json:"-"`
        	XXX_sizecache        int32    `json:"-"`
        }

          A disk associated with a GCE instance.

          func (*Disk) Descriptor

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

          func (*Disk) GetImage

          func (m *Disk) GetImage() string

          func (*Disk) ProtoMessage

          func (*Disk) ProtoMessage()

          func (*Disk) Reset

          func (m *Disk) Reset()

          func (*Disk) String

          func (m *Disk) String() string

          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 GetRequest

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

            A request to get an existing instance.

            func (*GetRequest) Descriptor

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

            func (*GetRequest) GetHostname

            func (m *GetRequest) GetHostname() string

            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 Instance

            type Instance struct {
            	// The ID of the VM this instance was created from.
            	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
            	// The hostname associated with this instance.
            	Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
            	// The zone associated with this instance.
            	// https://cloud.google.com/compute/docs/reference/rest/v1/zones/list.
            	Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"`
            	// The GCP project associated with this instance.
            	Project string `protobuf:"bytes,4,opt,name=project,proto3" json:"project,omitempty"`
            	// The timestamp when this instance was created.
            	Created *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
            	// The lifetime of this instance.
            	// At the end of its lifetime, the instance is deleted.
            	Lifetime int64 `protobuf:"varint,6,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
            	// The hostname of the Swarming server this instance should connect to.
            	Swarming string `protobuf:"bytes,7,opt,name=swarming,proto3" json:"swarming,omitempty"`
            	// The timestamp when this instance connected to Swarming.
            	Connected *timestamp.Timestamp `protobuf:"bytes,8,opt,name=connected,proto3" json:"connected,omitempty"`
            	// The timeout of this instance.
            	// If no Swarming bot has connected by the timeout, the instance is deleted.
            	Timeout int64 `protobuf:"varint,9,opt,name=timeout,proto3" json:"timeout,omitempty"`
            	// Whether this instance is drained or not.
            	// A drained instance will be safely deleted regardless of lifetime.
            	Drained bool `protobuf:"varint,10,opt,name=drained,proto3" json:"drained,omitempty"`
            	// The config revision associated with this instance.
            	ConfigRevision string `protobuf:"bytes,11,opt,name=config_revision,json=configRevision,proto3" json:"config_revision,omitempty"`
            	// The disks associated with this instance.
            	Disks []*Disk `protobuf:"bytes,12,rep,name=disks,proto3" json:"disks,omitempty"`
            	// The network interfaces associated with this instance.
            	NetworkInterfaces []*NetworkInterface `protobuf:"bytes,13,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"`
            	// The prefix associated with this instance.
            	Prefix               string   `protobuf:"bytes,14,opt,name=prefix,proto3" json:"prefix,omitempty"`
            	XXX_NoUnkeyedLiteral struct{} `json:"-"`
            	XXX_unrecognized     []byte   `json:"-"`
            	XXX_sizecache        int32    `json:"-"`
            }

              A GCE instance configured to exist. The instance actually exists iff the created timestamp is set.

              func (*Instance) Descriptor

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

              func (*Instance) GetConfigRevision

              func (m *Instance) GetConfigRevision() string

              func (*Instance) GetConnected

              func (m *Instance) GetConnected() *timestamp.Timestamp

              func (*Instance) GetCreated

              func (m *Instance) GetCreated() *timestamp.Timestamp

              func (*Instance) GetDisks

              func (m *Instance) GetDisks() []*Disk

              func (*Instance) GetDrained

              func (m *Instance) GetDrained() bool

              func (*Instance) GetHostname

              func (m *Instance) GetHostname() string

              func (*Instance) GetId

              func (m *Instance) GetId() string

              func (*Instance) GetLifetime

              func (m *Instance) GetLifetime() int64

              func (*Instance) GetNetworkInterfaces

              func (m *Instance) GetNetworkInterfaces() []*NetworkInterface

              func (*Instance) GetPrefix

              func (m *Instance) GetPrefix() string

              func (*Instance) GetProject

              func (m *Instance) GetProject() string

              func (*Instance) GetSwarming

              func (m *Instance) GetSwarming() string

              func (*Instance) GetTimeout

              func (m *Instance) GetTimeout() int64

              func (*Instance) GetZone

              func (m *Instance) GetZone() string

              func (*Instance) ProtoMessage

              func (*Instance) ProtoMessage()

              func (*Instance) Reset

              func (m *Instance) Reset()

              func (*Instance) String

              func (m *Instance) String() string

              func (*Instance) XXX_DiscardUnknown

              func (m *Instance) XXX_DiscardUnknown()

              func (*Instance) XXX_Marshal

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

              func (*Instance) XXX_Merge

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

              func (*Instance) XXX_Size

              func (m *Instance) XXX_Size() int

              func (*Instance) XXX_Unmarshal

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

              type InstancesClient

              type InstancesClient interface {
              	// Delete deletes an instance asynchronously.
              	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
              	// Get returns an existing instance.
              	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Instance, error)
              	// List returns existing instances.
              	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
              }

                InstancesClient is the client API for Instances service.

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

                func NewInstancesClient

                func NewInstancesClient(cc grpc.ClientConnInterface) InstancesClient

                func NewInstancesPRPCClient

                func NewInstancesPRPCClient(client *prpc.Client) InstancesClient

                type InstancesServer

                type InstancesServer interface {
                	// Delete deletes an instance asynchronously.
                	Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
                	// Get returns an existing instance.
                	Get(context.Context, *GetRequest) (*Instance, error)
                	// List returns existing instances.
                	List(context.Context, *ListRequest) (*ListResponse, error)
                }

                  InstancesServer is the server API for Instances service.

                  type ListRequest

                  type ListRequest struct {
                  	// The prefix to list instances for.
                  	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
                  	// The value of next_page_token received in a ListResponse. Used to get the
                  	// next page of instances. If empty, gets the first page.
                  	PageToken string `protobuf:"bytes,2,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,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
                  	// A filter to apply when listing instances. Currently the only supported
                  	// filter is "disks.image=<image>" where <image> is the name of the image to
                  	// filter for.
                  	Filter               string   `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
                  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
                  	XXX_unrecognized     []byte   `json:"-"`
                  	XXX_sizecache        int32    `json:"-"`
                  }

                    A request to list existing instances.

                    func (*ListRequest) Descriptor

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

                    func (*ListRequest) GetFilter

                    func (m *ListRequest) GetFilter() string

                    func (*ListRequest) GetPageSize

                    func (m *ListRequest) GetPageSize() int32

                    func (*ListRequest) GetPageToken

                    func (m *ListRequest) GetPageToken() string

                    func (*ListRequest) GetPrefix

                    func (m *ListRequest) GetPrefix() 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 prefix the instances are for.
                    	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
                    	// The instances matching the prefix.
                    	Instances []*Instance `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
                    	// The value to use as the page_token in a ListRequest to get the next page of
                    	// instances. If empty, there are no more instances.
                    	NextPageToken        string   `protobuf:"bytes,3,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 instances.

                      func (*ListResponse) Descriptor

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

                      func (*ListResponse) GetInstances

                      func (m *ListResponse) GetInstances() []*Instance

                      func (*ListResponse) GetNextPageToken

                      func (m *ListResponse) GetNextPageToken() string

                      func (*ListResponse) GetPrefix

                      func (m *ListResponse) GetPrefix() 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 NetworkInterface

                      type NetworkInterface struct {
                      	// The internal IP address associated with this network interface.
                      	InternalIp string `protobuf:"bytes,1,opt,name=internal_ip,json=internalIp,proto3" json:"internal_ip,omitempty"`
                      	// The external IP addresses associated with this network interface.
                      	ExternalIps          []string `protobuf:"bytes,2,rep,name=external_ips,json=externalIps,proto3" json:"external_ips,omitempty"`
                      	XXX_NoUnkeyedLiteral struct{} `json:"-"`
                      	XXX_unrecognized     []byte   `json:"-"`
                      	XXX_sizecache        int32    `json:"-"`
                      }

                        A network interface associated with a GCE instance.

                        func (*NetworkInterface) Descriptor

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

                        func (*NetworkInterface) GetExternalIps

                        func (m *NetworkInterface) GetExternalIps() []string

                        func (*NetworkInterface) GetInternalIp

                        func (m *NetworkInterface) GetInternalIp() 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 UnimplementedInstancesServer

                        type UnimplementedInstancesServer struct {
                        }

                          UnimplementedInstancesServer can be embedded to have forward compatible implementations.

                          func (*UnimplementedInstancesServer) Delete

                          func (*UnimplementedInstancesServer) Get

                          func (*UnimplementedInstancesServer) List