luci: go.chromium.org/luci/gce/api/instances/v1 Index | Files

package instances

import "go.chromium.org/luci/gce/api/instances/v1"

Package instances contains a GCE instances service.

Index

Package Files

doc.go generate.go instancesserver_dec.go pb.discovery.go service.pb.go

func FileDescriptorSet Uses

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 Uses

func RegisterInstancesServer(s prpc.Registrar, srv InstancesServer)

type DecoratedInstances Uses

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 Uses

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

func (*DecoratedInstances) Get Uses

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

func (*DecoratedInstances) List Uses

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

type DeleteRequest Uses

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 Uses

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

func (*DeleteRequest) GetHostname Uses

func (m *DeleteRequest) GetHostname() string

func (*DeleteRequest) GetId Uses

func (m *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage Uses

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset Uses

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String Uses

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown Uses

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal Uses

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

func (*DeleteRequest) XXX_Merge Uses

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

func (*DeleteRequest) XXX_Size Uses

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal Uses

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

type Disk Uses

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 Uses

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

func (*Disk) GetImage Uses

func (m *Disk) GetImage() string

func (*Disk) ProtoMessage Uses

func (*Disk) ProtoMessage()

func (*Disk) Reset Uses

func (m *Disk) Reset()

func (*Disk) String Uses

func (m *Disk) String() string

func (*Disk) XXX_DiscardUnknown Uses

func (m *Disk) XXX_DiscardUnknown()

func (*Disk) XXX_Marshal Uses

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

func (*Disk) XXX_Merge Uses

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

func (*Disk) XXX_Size Uses

func (m *Disk) XXX_Size() int

func (*Disk) XXX_Unmarshal Uses

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

type GetRequest Uses

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 Uses

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

func (*GetRequest) GetHostname Uses

func (m *GetRequest) GetHostname() string

func (*GetRequest) GetId Uses

func (m *GetRequest) GetId() string

func (*GetRequest) ProtoMessage Uses

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset Uses

func (m *GetRequest) Reset()

func (*GetRequest) String Uses

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown Uses

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal Uses

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

func (*GetRequest) XXX_Merge Uses

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

func (*GetRequest) XXX_Size Uses

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal Uses

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

type Instance Uses

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 Uses

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

func (*Instance) GetConfigRevision Uses

func (m *Instance) GetConfigRevision() string

func (*Instance) GetConnected Uses

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

func (*Instance) GetCreated Uses

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

func (*Instance) GetDisks Uses

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

func (*Instance) GetDrained Uses

func (m *Instance) GetDrained() bool

func (*Instance) GetHostname Uses

func (m *Instance) GetHostname() string

func (*Instance) GetId Uses

func (m *Instance) GetId() string

func (*Instance) GetLifetime Uses

func (m *Instance) GetLifetime() int64

func (*Instance) GetNetworkInterfaces Uses

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

func (*Instance) GetPrefix Uses

func (m *Instance) GetPrefix() string

func (*Instance) GetProject Uses

func (m *Instance) GetProject() string

func (*Instance) GetSwarming Uses

func (m *Instance) GetSwarming() string

func (*Instance) GetTimeout Uses

func (m *Instance) GetTimeout() int64

func (*Instance) GetZone Uses

func (m *Instance) GetZone() string

func (*Instance) ProtoMessage Uses

func (*Instance) ProtoMessage()

func (*Instance) Reset Uses

func (m *Instance) Reset()

func (*Instance) String Uses

func (m *Instance) String() string

func (*Instance) XXX_DiscardUnknown Uses

func (m *Instance) XXX_DiscardUnknown()

func (*Instance) XXX_Marshal Uses

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

func (*Instance) XXX_Merge Uses

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

func (*Instance) XXX_Size Uses

func (m *Instance) XXX_Size() int

func (*Instance) XXX_Unmarshal Uses

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

type InstancesClient Uses

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 Uses

func NewInstancesClient(cc *grpc.ClientConn) InstancesClient

func NewInstancesPRPCClient Uses

func NewInstancesPRPCClient(client *prpc.Client) InstancesClient

type InstancesServer Uses

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 Uses

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 Uses

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

func (*ListRequest) GetFilter Uses

func (m *ListRequest) GetFilter() string

func (*ListRequest) GetPageSize Uses

func (m *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken Uses

func (m *ListRequest) GetPageToken() string

func (*ListRequest) GetPrefix Uses

func (m *ListRequest) GetPrefix() string

func (*ListRequest) ProtoMessage Uses

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset Uses

func (m *ListRequest) Reset()

func (*ListRequest) String Uses

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown Uses

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal Uses

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

func (*ListRequest) XXX_Merge Uses

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

func (*ListRequest) XXX_Size Uses

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal Uses

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

type ListResponse Uses

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 Uses

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

func (*ListResponse) GetInstances Uses

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

func (*ListResponse) GetNextPageToken Uses

func (m *ListResponse) GetNextPageToken() string

func (*ListResponse) GetPrefix Uses

func (m *ListResponse) GetPrefix() string

func (*ListResponse) ProtoMessage Uses

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset Uses

func (m *ListResponse) Reset()

func (*ListResponse) String Uses

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown Uses

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal Uses

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

func (*ListResponse) XXX_Merge Uses

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

func (*ListResponse) XXX_Size Uses

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal Uses

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

type NetworkInterface Uses

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 Uses

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

func (*NetworkInterface) GetExternalIps Uses

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

func (*NetworkInterface) GetInternalIp Uses

func (m *NetworkInterface) GetInternalIp() string

func (*NetworkInterface) ProtoMessage Uses

func (*NetworkInterface) ProtoMessage()

func (*NetworkInterface) Reset Uses

func (m *NetworkInterface) Reset()

func (*NetworkInterface) String Uses

func (m *NetworkInterface) String() string

func (*NetworkInterface) XXX_DiscardUnknown Uses

func (m *NetworkInterface) XXX_DiscardUnknown()

func (*NetworkInterface) XXX_Marshal Uses

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

func (*NetworkInterface) XXX_Merge Uses

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

func (*NetworkInterface) XXX_Size Uses

func (m *NetworkInterface) XXX_Size() int

func (*NetworkInterface) XXX_Unmarshal Uses

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

type UnimplementedInstancesServer Uses

type UnimplementedInstancesServer struct {
}

UnimplementedInstancesServer can be embedded to have forward compatible implementations.

func (*UnimplementedInstancesServer) Delete Uses

func (*UnimplementedInstancesServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error)

func (*UnimplementedInstancesServer) Get Uses

func (*UnimplementedInstancesServer) Get(ctx context.Context, req *GetRequest) (*Instance, error)

func (*UnimplementedInstancesServer) List Uses

func (*UnimplementedInstancesServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)

Package instances imports 12 packages (graph) and is imported by 2 packages. Updated 2019-12-09. Refresh now. Tools for package owners.