instance

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: GPL-3.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Instance_State_name = map[int32]string{
		0: "STATE_UNKNOWN",
		1: "STATE_INITIALIZING",
		2: "STATE_RUNNING",
		3: "STATE_ENDING",
	}
	Instance_State_value = map[string]int32{
		"STATE_UNKNOWN":      0,
		"STATE_INITIALIZING": 1,
		"STATE_RUNNING":      2,
		"STATE_ENDING":       3,
	}
)

Enum value maps for Instance_State.

View Source
var File_cow_instance_v1_instance_service_api_proto protoreflect.FileDescriptor
View Source
var File_cow_instance_v1_types_proto protoreflect.FileDescriptor
View Source
var InstanceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cow.instance.v1.InstanceService",
	HandlerType: (*InstanceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _InstanceService_Create_Handler,
		},
		{
			MethodName: "End",
			Handler:    _InstanceService_End_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _InstanceService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cow/instance/v1/instance_service_api.proto",
}

InstanceService_ServiceDesc is the grpc.ServiceDesc for InstanceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterInstanceServiceServer

func RegisterInstanceServiceServer(s grpc.ServiceRegistrar, srv InstanceServiceServer)

Types

type CreateInstanceRequest

type CreateInstanceRequest struct {

	// Types that are assignable to Instance:
	//	*CreateInstanceRequest_Info
	//	*CreateInstanceRequest_Manifest
	Instance isCreateInstanceRequest_Instance `protobuf_oneof:"instance"`
	// contains filtered or unexported fields
}

func (*CreateInstanceRequest) Descriptor deprecated

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

Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead.

func (*CreateInstanceRequest) GetInfo added in v0.15.20

func (x *CreateInstanceRequest) GetInfo() *TemplateInfo

func (*CreateInstanceRequest) GetInstance added in v0.15.20

func (m *CreateInstanceRequest) GetInstance() isCreateInstanceRequest_Instance

func (*CreateInstanceRequest) GetManifest

func (x *CreateInstanceRequest) GetManifest() *structpb.Struct

func (*CreateInstanceRequest) ProtoMessage

func (*CreateInstanceRequest) ProtoMessage()

func (*CreateInstanceRequest) ProtoReflect

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

func (*CreateInstanceRequest) Reset

func (x *CreateInstanceRequest) Reset()

func (*CreateInstanceRequest) String

func (x *CreateInstanceRequest) String() string

type CreateInstanceRequest_Info added in v0.15.20

type CreateInstanceRequest_Info struct {
	// Information for the service about the template that
	// should be used to create the instance
	Info *TemplateInfo `protobuf:"bytes,1,opt,name=info,proto3,oneof"`
}

type CreateInstanceRequest_Manifest added in v0.15.20

type CreateInstanceRequest_Manifest struct {
	// The Kubernetes instance manifest or name of
	// a manifest template configured in the service
	Manifest *structpb.Struct `protobuf:"bytes,2,opt,name=manifest,proto3,oneof"`
}

type CreateInstanceResponse

type CreateInstanceResponse struct {

	// The instance created by the service
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateInstanceResponse) Descriptor deprecated

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

Deprecated: Use CreateInstanceResponse.ProtoReflect.Descriptor instead.

func (*CreateInstanceResponse) GetInstance

func (x *CreateInstanceResponse) GetInstance() *Instance

func (*CreateInstanceResponse) ProtoMessage

func (*CreateInstanceResponse) ProtoMessage()

func (*CreateInstanceResponse) ProtoReflect

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

func (*CreateInstanceResponse) Reset

func (x *CreateInstanceResponse) Reset()

func (*CreateInstanceResponse) String

func (x *CreateInstanceResponse) String() string

type EndInstanceRequest added in v0.15.19

type EndInstanceRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*EndInstanceRequest) Descriptor deprecated added in v0.15.19

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

Deprecated: Use EndInstanceRequest.ProtoReflect.Descriptor instead.

func (*EndInstanceRequest) GetId added in v0.15.19

func (x *EndInstanceRequest) GetId() string

func (*EndInstanceRequest) ProtoMessage added in v0.15.19

func (*EndInstanceRequest) ProtoMessage()

func (*EndInstanceRequest) ProtoReflect added in v0.15.19

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

func (*EndInstanceRequest) Reset added in v0.15.19

func (x *EndInstanceRequest) Reset()

func (*EndInstanceRequest) String added in v0.15.19

func (x *EndInstanceRequest) String() string

type EndInstanceResponse added in v0.15.19

type EndInstanceResponse struct {

	// The instance marked as ended by the service
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*EndInstanceResponse) Descriptor deprecated added in v0.15.19

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

Deprecated: Use EndInstanceResponse.ProtoReflect.Descriptor instead.

func (*EndInstanceResponse) GetInstance added in v0.15.19

func (x *EndInstanceResponse) GetInstance() *Instance

func (*EndInstanceResponse) ProtoMessage added in v0.15.19

func (*EndInstanceResponse) ProtoMessage()

func (*EndInstanceResponse) ProtoReflect added in v0.15.19

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

func (*EndInstanceResponse) Reset added in v0.15.19

func (x *EndInstanceResponse) Reset()

func (*EndInstanceResponse) String added in v0.15.19

func (x *EndInstanceResponse) String() string

type GetInstanceRequest

type GetInstanceRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInstanceRequest) Descriptor deprecated

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

Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead.

func (*GetInstanceRequest) GetId

func (x *GetInstanceRequest) GetId() string

func (*GetInstanceRequest) ProtoMessage

func (*GetInstanceRequest) ProtoMessage()

func (*GetInstanceRequest) ProtoReflect

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

func (*GetInstanceRequest) Reset

func (x *GetInstanceRequest) Reset()

func (*GetInstanceRequest) String

func (x *GetInstanceRequest) String() string

type GetInstanceResponse

type GetInstanceResponse struct {

	// The instance requested
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInstanceResponse) Descriptor deprecated

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

Deprecated: Use GetInstanceResponse.ProtoReflect.Descriptor instead.

func (*GetInstanceResponse) GetInstance

func (x *GetInstanceResponse) GetInstance() *Instance

func (*GetInstanceResponse) ProtoMessage

func (*GetInstanceResponse) ProtoMessage()

func (*GetInstanceResponse) ProtoReflect

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

func (*GetInstanceResponse) Reset

func (x *GetInstanceResponse) Reset()

func (*GetInstanceResponse) String

func (x *GetInstanceResponse) String() string

type Instance

type Instance struct {

	// Unique id of the instance
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the instance, serves only documentational purposes
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The IP address the instance is reachable on
	Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	// Current state of the instance
	State Instance_State `protobuf:"varint,4,opt,name=state,proto3,enum=cow.instance.v1.Instance_State" json:"state,omitempty"`
	// Metadata about the instance
	Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Instance) Descriptor deprecated

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

Deprecated: Use Instance.ProtoReflect.Descriptor instead.

func (*Instance) GetId

func (x *Instance) GetId() string

func (*Instance) GetIp

func (x *Instance) GetIp() string

func (*Instance) GetMetadata

func (x *Instance) GetMetadata() *Metadata

func (*Instance) GetName

func (x *Instance) GetName() string

func (*Instance) GetState

func (x *Instance) GetState() Instance_State

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) ProtoReflect

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

func (*Instance) Reset

func (x *Instance) Reset()

func (*Instance) String

func (x *Instance) String() string

type InstanceEndedEvent added in v0.16.9

type InstanceEndedEvent struct {

	// The instance ended
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

InstanceEndedEvent will be fired when a currently running Instance has ended.

func (*InstanceEndedEvent) Descriptor deprecated added in v0.16.9

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

Deprecated: Use InstanceEndedEvent.ProtoReflect.Descriptor instead.

func (*InstanceEndedEvent) GetInstance added in v0.16.9

func (x *InstanceEndedEvent) GetInstance() *Instance

func (*InstanceEndedEvent) ProtoMessage added in v0.16.9

func (*InstanceEndedEvent) ProtoMessage()

func (*InstanceEndedEvent) ProtoReflect added in v0.16.9

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

func (*InstanceEndedEvent) Reset added in v0.16.9

func (x *InstanceEndedEvent) Reset()

func (*InstanceEndedEvent) String added in v0.16.9

func (x *InstanceEndedEvent) String() string

type InstanceServiceClient

type InstanceServiceClient interface {
	// Create creates a new instance in the cluster
	Create(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*CreateInstanceResponse, error)
	// End marks Instance as ended
	End(ctx context.Context, in *EndInstanceRequest, opts ...grpc.CallOption) (*EndInstanceResponse, error)
	// Get retrieves information about an existing instance
	Get(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*GetInstanceResponse, error)
}

InstanceServiceClient is the client API for InstanceService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type InstanceServiceServer

type InstanceServiceServer interface {
	// Create creates a new instance in the cluster
	Create(context.Context, *CreateInstanceRequest) (*CreateInstanceResponse, error)
	// End marks Instance as ended
	End(context.Context, *EndInstanceRequest) (*EndInstanceResponse, error)
	// Get retrieves information about an existing instance
	Get(context.Context, *GetInstanceRequest) (*GetInstanceResponse, error)
}

InstanceServiceServer is the server API for InstanceService service. All implementations should embed UnimplementedInstanceServiceServer for forward compatibility

type InstanceStartedEvent added in v0.16.9

type InstanceStartedEvent struct {

	// The instance started
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

InstanceStartedEvent will be fired when a new Instance has been started.

func (*InstanceStartedEvent) Descriptor deprecated added in v0.16.9

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

Deprecated: Use InstanceStartedEvent.ProtoReflect.Descriptor instead.

func (*InstanceStartedEvent) GetInstance added in v0.16.9

func (x *InstanceStartedEvent) GetInstance() *Instance

func (*InstanceStartedEvent) ProtoMessage added in v0.16.9

func (*InstanceStartedEvent) ProtoMessage()

func (*InstanceStartedEvent) ProtoReflect added in v0.16.9

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

func (*InstanceStartedEvent) Reset added in v0.16.9

func (x *InstanceStartedEvent) Reset()

func (*InstanceStartedEvent) String added in v0.16.9

func (x *InstanceStartedEvent) String() string

type InstanceStateChangedEvent added in v0.16.9

type InstanceStateChangedEvent struct {

	// The Instance affected by state change
	Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// The new state of the Instance
	NewState *structpb.Struct `protobuf:"bytes,2,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"`
	// The previous state of the Instance
	OldState *structpb.Struct `protobuf:"bytes,3,opt,name=old_state,json=oldState,proto3" json:"old_state,omitempty"`
	// contains filtered or unexported fields
}

InstanceStateChangedEvent will be fired when the state of an Instance changed.

func (*InstanceStateChangedEvent) Descriptor deprecated added in v0.16.9

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

Deprecated: Use InstanceStateChangedEvent.ProtoReflect.Descriptor instead.

func (*InstanceStateChangedEvent) GetInstance added in v0.16.9

func (x *InstanceStateChangedEvent) GetInstance() *Instance

func (*InstanceStateChangedEvent) GetNewState added in v0.16.9

func (x *InstanceStateChangedEvent) GetNewState() *structpb.Struct

func (*InstanceStateChangedEvent) GetOldState added in v0.16.9

func (x *InstanceStateChangedEvent) GetOldState() *structpb.Struct

func (*InstanceStateChangedEvent) ProtoMessage added in v0.16.9

func (*InstanceStateChangedEvent) ProtoMessage()

func (*InstanceStateChangedEvent) ProtoReflect added in v0.16.9

func (*InstanceStateChangedEvent) Reset added in v0.16.9

func (x *InstanceStateChangedEvent) Reset()

func (*InstanceStateChangedEvent) String added in v0.16.9

func (x *InstanceStateChangedEvent) String() string

type Instance_State

type Instance_State int32
const (
	Instance_STATE_UNKNOWN      Instance_State = 0
	Instance_STATE_INITIALIZING Instance_State = 1
	Instance_STATE_RUNNING      Instance_State = 2
	Instance_STATE_ENDING       Instance_State = 3
)

func (Instance_State) Descriptor

func (Instance_State) Enum

func (x Instance_State) Enum() *Instance_State

func (Instance_State) EnumDescriptor deprecated

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

Deprecated: Use Instance_State.Descriptor instead.

func (Instance_State) Number

func (Instance_State) String

func (x Instance_State) String() string

func (Instance_State) Type

type Metadata

type Metadata struct {

	// The currently observed state. The underlying application
	// that is running can define this state
	State *structpb.Struct `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	// Players that are currently connected or have been connected to the instance
	Players []*Player `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetPlayers

func (x *Metadata) GetPlayers() []*Player

func (*Metadata) GetState

func (x *Metadata) GetState() *structpb.Struct

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 Player

type Player struct {

	// Unique id of the player
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Application specific metadata about the player.
	// The underlying application that is running defines this metadata field
	Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Player) Descriptor deprecated

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

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetId

func (x *Player) GetId() string

func (*Player) GetMetadata

func (x *Player) GetMetadata() *structpb.Struct

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

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

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

type TemplateInfo added in v0.15.20

type TemplateInfo struct {

	// The name of the instance template
	TemplateName string `protobuf:"bytes,1,opt,name=template_name,json=templateName,proto3" json:"template_name,omitempty"`
	// The name the templated instance should have
	InstanceName string `protobuf:"bytes,2,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
	// contains filtered or unexported fields
}

func (*TemplateInfo) Descriptor deprecated added in v0.15.20

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

Deprecated: Use TemplateInfo.ProtoReflect.Descriptor instead.

func (*TemplateInfo) GetInstanceName added in v0.15.20

func (x *TemplateInfo) GetInstanceName() string

func (*TemplateInfo) GetTemplateName added in v0.15.20

func (x *TemplateInfo) GetTemplateName() string

func (*TemplateInfo) ProtoMessage added in v0.15.20

func (*TemplateInfo) ProtoMessage()

func (*TemplateInfo) ProtoReflect added in v0.15.20

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

func (*TemplateInfo) Reset added in v0.15.20

func (x *TemplateInfo) Reset()

func (*TemplateInfo) String added in v0.15.20

func (x *TemplateInfo) String() string

type UnimplementedInstanceServiceServer

type UnimplementedInstanceServiceServer struct {
}

UnimplementedInstanceServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedInstanceServiceServer) Create

func (UnimplementedInstanceServiceServer) End added in v0.15.19

func (UnimplementedInstanceServiceServer) Get

type UnsafeInstanceServiceServer

type UnsafeInstanceServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeInstanceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InstanceServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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