Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterInstanceServer(s grpc.ServiceRegistrar, srv InstanceServer)
- func RegisterRootServer(s grpc.ServiceRegistrar, srv RootServer)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetConfig() *InstanceConfig
- func (x *CreateRequest) GetServiceName() string
- func (x *CreateRequest) GetSnapshot() []byte
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- func (*CreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateResponse) GetId() []byte
- func (x *CreateResponse) GetRestorationError() string
- func (*CreateResponse) ProtoMessage()
- func (x *CreateResponse) ProtoReflect() protoreflect.Message
- func (x *CreateResponse) Reset()
- func (x *CreateResponse) String() string
- type HandleRequest
- func (*HandleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HandleRequest) GetData() []byte
- func (x *HandleRequest) GetId() []byte
- func (*HandleRequest) ProtoMessage()
- func (x *HandleRequest) ProtoReflect() protoreflect.Message
- func (x *HandleRequest) Reset()
- func (x *HandleRequest) String() string
- type InitRequest
- type InitResponse
- type InstanceClient
- type InstanceConfig
- func (*InstanceConfig) Descriptor() ([]byte, []int)deprecated
- func (x *InstanceConfig) GetInstanceUuid() []byte
- func (x *InstanceConfig) GetMaxSendSize() int32
- func (x *InstanceConfig) GetPrincipalId() string
- func (x *InstanceConfig) GetProcessKey() []byte
- func (*InstanceConfig) ProtoMessage()
- func (x *InstanceConfig) ProtoReflect() protoreflect.Message
- func (x *InstanceConfig) Reset()
- func (x *InstanceConfig) String() string
- type InstanceServer
- type Instance_ReceiveClient
- type Instance_ReceiveServer
- type ReceiveRequest
- type RootClient
- type RootServer
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetName() string
- func (x *Service) GetRequirePrincipal() bool
- func (x *Service) GetRevision() string
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- type ShutdownRequest
- type SnapshotRequest
- func (*SnapshotRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SnapshotRequest) GetId() []byte
- func (x *SnapshotRequest) GetIncoming() []byte
- func (x *SnapshotRequest) GetOutgoing() []byte
- func (*SnapshotRequest) ProtoMessage()
- func (x *SnapshotRequest) ProtoReflect() protoreflect.Message
- func (x *SnapshotRequest) Reset()
- func (x *SnapshotRequest) String() string
- type SuspendRequest
- type UnimplementedInstanceServer
- func (UnimplementedInstanceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedInstanceServer) Handle(context.Context, *HandleRequest) (*emptypb.Empty, error)
- func (UnimplementedInstanceServer) Receive(*ReceiveRequest, grpc.ServerStreamingServer[wrapperspb.BytesValue]) error
- func (UnimplementedInstanceServer) Shutdown(context.Context, *ShutdownRequest) (*emptypb.Empty, error)
- func (UnimplementedInstanceServer) Snapshot(context.Context, *SnapshotRequest) (*wrapperspb.BytesValue, error)
- func (UnimplementedInstanceServer) Suspend(context.Context, *SuspendRequest) (*emptypb.Empty, error)
- type UnimplementedRootServer
- type UnsafeInstanceServer
- type UnsafeRootServer
Constants ¶
const ( Instance_Create_FullMethodName = "/gate.service.grpc.Instance/Create" Instance_Receive_FullMethodName = "/gate.service.grpc.Instance/Receive" Instance_Handle_FullMethodName = "/gate.service.grpc.Instance/Handle" Instance_Shutdown_FullMethodName = "/gate.service.grpc.Instance/Shutdown" Instance_Suspend_FullMethodName = "/gate.service.grpc.Instance/Suspend" Instance_Snapshot_FullMethodName = "/gate.service.grpc.Instance/Snapshot" )
const (
Root_Init_FullMethodName = "/gate.service.grpc.Root/Init"
)
Variables ¶
var File_gate_pb_service_grpc_service_proto protoreflect.FileDescriptor
var Instance_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gate.service.grpc.Instance", HandlerType: (*InstanceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Instance_Create_Handler, }, { MethodName: "Handle", Handler: _Instance_Handle_Handler, }, { MethodName: "Shutdown", Handler: _Instance_Shutdown_Handler, }, { MethodName: "Suspend", Handler: _Instance_Suspend_Handler, }, { MethodName: "Snapshot", Handler: _Instance_Snapshot_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Receive", Handler: _Instance_Receive_Handler, ServerStreams: true, }, }, Metadata: "gate/pb/service/grpc/service.proto", }
Instance_ServiceDesc is the grpc.ServiceDesc for Instance service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Root_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gate.service.grpc.Root", HandlerType: (*RootServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Init", Handler: _Root_Init_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gate/pb/service/grpc/service.proto", }
Root_ServiceDesc is the grpc.ServiceDesc for Root service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInstanceServer ¶
func RegisterInstanceServer(s grpc.ServiceRegistrar, srv InstanceServer)
func RegisterRootServer ¶
func RegisterRootServer(s grpc.ServiceRegistrar, srv RootServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Config *InstanceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` Snapshot []byte `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetConfig ¶
func (x *CreateRequest) GetConfig() *InstanceConfig
func (*CreateRequest) GetServiceName ¶
func (x *CreateRequest) GetServiceName() string
func (*CreateRequest) GetSnapshot ¶
func (x *CreateRequest) GetSnapshot() []byte
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` RestorationError string `protobuf:"bytes,2,opt,name=restoration_error,json=restorationError,proto3" json:"restoration_error,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() []byte
func (*CreateResponse) GetRestorationError ¶
func (x *CreateResponse) GetRestorationError() string
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type HandleRequest ¶
type HandleRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HandleRequest) Descriptor
deprecated
func (*HandleRequest) Descriptor() ([]byte, []int)
Deprecated: Use HandleRequest.ProtoReflect.Descriptor instead.
func (*HandleRequest) GetData ¶
func (x *HandleRequest) GetData() []byte
func (*HandleRequest) GetId ¶
func (x *HandleRequest) GetId() []byte
func (*HandleRequest) ProtoMessage ¶
func (*HandleRequest) ProtoMessage()
func (*HandleRequest) ProtoReflect ¶
func (x *HandleRequest) ProtoReflect() protoreflect.Message
func (*HandleRequest) Reset ¶
func (x *HandleRequest) Reset()
func (*HandleRequest) String ¶
func (x *HandleRequest) String() string
type InitRequest ¶
type InitRequest struct {
// contains filtered or unexported fields
}
func (*InitRequest) Descriptor
deprecated
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) ProtoReflect ¶
func (x *InitRequest) ProtoReflect() protoreflect.Message
func (*InitRequest) Reset ¶
func (x *InitRequest) Reset()
func (*InitRequest) String ¶
func (x *InitRequest) String() string
type InitResponse ¶
type InitResponse struct { Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // contains filtered or unexported fields }
func (*InitResponse) Descriptor
deprecated
func (*InitResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.
func (*InitResponse) GetServices ¶
func (x *InitResponse) GetServices() []*Service
func (*InitResponse) ProtoMessage ¶
func (*InitResponse) ProtoMessage()
func (*InitResponse) ProtoReflect ¶
func (x *InitResponse) ProtoReflect() protoreflect.Message
func (*InitResponse) Reset ¶
func (x *InitResponse) Reset()
func (*InitResponse) String ¶
func (x *InitResponse) String() string
type InstanceClient ¶
type InstanceClient interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[wrapperspb.BytesValue], error) Handle(ctx context.Context, in *HandleRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error) }
InstanceClient is the client API for Instance 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.
func NewInstanceClient ¶
func NewInstanceClient(cc grpc.ClientConnInterface) InstanceClient
type InstanceConfig ¶
type InstanceConfig struct { MaxSendSize int32 `protobuf:"varint,1,opt,name=max_send_size,json=maxSendSize,proto3" json:"max_send_size,omitempty"` ProcessKey []byte `protobuf:"bytes,2,opt,name=process_key,json=processKey,proto3" json:"process_key,omitempty"` PrincipalId string `protobuf:"bytes,3,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"` InstanceUuid []byte `protobuf:"bytes,4,opt,name=instance_uuid,json=instanceUuid,proto3" json:"instance_uuid,omitempty"` // contains filtered or unexported fields }
func (*InstanceConfig) Descriptor
deprecated
func (*InstanceConfig) Descriptor() ([]byte, []int)
Deprecated: Use InstanceConfig.ProtoReflect.Descriptor instead.
func (*InstanceConfig) GetInstanceUuid ¶
func (x *InstanceConfig) GetInstanceUuid() []byte
func (*InstanceConfig) GetMaxSendSize ¶
func (x *InstanceConfig) GetMaxSendSize() int32
func (*InstanceConfig) GetPrincipalId ¶
func (x *InstanceConfig) GetPrincipalId() string
func (*InstanceConfig) GetProcessKey ¶
func (x *InstanceConfig) GetProcessKey() []byte
func (*InstanceConfig) ProtoMessage ¶
func (*InstanceConfig) ProtoMessage()
func (*InstanceConfig) ProtoReflect ¶
func (x *InstanceConfig) ProtoReflect() protoreflect.Message
func (*InstanceConfig) Reset ¶
func (x *InstanceConfig) Reset()
func (*InstanceConfig) String ¶
func (x *InstanceConfig) String() string
type InstanceServer ¶
type InstanceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Receive(*ReceiveRequest, grpc.ServerStreamingServer[wrapperspb.BytesValue]) error Handle(context.Context, *HandleRequest) (*emptypb.Empty, error) Shutdown(context.Context, *ShutdownRequest) (*emptypb.Empty, error) Suspend(context.Context, *SuspendRequest) (*emptypb.Empty, error) Snapshot(context.Context, *SnapshotRequest) (*wrapperspb.BytesValue, error) // contains filtered or unexported methods }
InstanceServer is the server API for Instance service. All implementations must embed UnimplementedInstanceServer for forward compatibility.
type Instance_ReceiveClient ¶
type Instance_ReceiveClient = grpc.ServerStreamingClient[wrapperspb.BytesValue]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Instance_ReceiveServer ¶
type Instance_ReceiveServer = grpc.ServerStreamingServer[wrapperspb.BytesValue]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ReceiveRequest ¶
type ReceiveRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ReceiveRequest) Descriptor
deprecated
func (*ReceiveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.
func (*ReceiveRequest) GetId ¶
func (x *ReceiveRequest) GetId() []byte
func (*ReceiveRequest) ProtoMessage ¶
func (*ReceiveRequest) ProtoMessage()
func (*ReceiveRequest) ProtoReflect ¶
func (x *ReceiveRequest) ProtoReflect() protoreflect.Message
func (*ReceiveRequest) Reset ¶
func (x *ReceiveRequest) Reset()
func (*ReceiveRequest) String ¶
func (x *ReceiveRequest) String() string
type RootClient ¶
type RootClient interface {
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
}
RootClient is the client API for Root 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.
func NewRootClient ¶
func NewRootClient(cc grpc.ClientConnInterface) RootClient
type RootServer ¶
type RootServer interface { Init(context.Context, *InitRequest) (*InitResponse, error) // contains filtered or unexported methods }
RootServer is the server API for Root service. All implementations must embed UnimplementedRootServer for forward compatibility.
type Service ¶
type Service struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` RequirePrincipal bool `protobuf:"varint,3,opt,name=require_principal,json=requirePrincipal,proto3" json:"require_principal,omitempty"` // contains filtered or unexported fields }
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type ShutdownRequest ¶
type ShutdownRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ShutdownRequest) Descriptor
deprecated
func (*ShutdownRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.
func (*ShutdownRequest) GetId ¶
func (x *ShutdownRequest) GetId() []byte
func (*ShutdownRequest) ProtoMessage ¶
func (*ShutdownRequest) ProtoMessage()
func (*ShutdownRequest) ProtoReflect ¶
func (x *ShutdownRequest) ProtoReflect() protoreflect.Message
func (*ShutdownRequest) Reset ¶
func (x *ShutdownRequest) Reset()
func (*ShutdownRequest) String ¶
func (x *ShutdownRequest) String() string
type SnapshotRequest ¶
type SnapshotRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Outgoing []byte `protobuf:"bytes,2,opt,name=outgoing,proto3" json:"outgoing,omitempty"` Incoming []byte `protobuf:"bytes,3,opt,name=incoming,proto3" json:"incoming,omitempty"` // contains filtered or unexported fields }
func (*SnapshotRequest) Descriptor
deprecated
func (*SnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use SnapshotRequest.ProtoReflect.Descriptor instead.
func (*SnapshotRequest) GetId ¶
func (x *SnapshotRequest) GetId() []byte
func (*SnapshotRequest) GetIncoming ¶
func (x *SnapshotRequest) GetIncoming() []byte
func (*SnapshotRequest) GetOutgoing ¶
func (x *SnapshotRequest) GetOutgoing() []byte
func (*SnapshotRequest) ProtoMessage ¶
func (*SnapshotRequest) ProtoMessage()
func (*SnapshotRequest) ProtoReflect ¶
func (x *SnapshotRequest) ProtoReflect() protoreflect.Message
func (*SnapshotRequest) Reset ¶
func (x *SnapshotRequest) Reset()
func (*SnapshotRequest) String ¶
func (x *SnapshotRequest) String() string
type SuspendRequest ¶
type SuspendRequest struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*SuspendRequest) Descriptor
deprecated
func (*SuspendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead.
func (*SuspendRequest) GetId ¶
func (x *SuspendRequest) GetId() []byte
func (*SuspendRequest) ProtoMessage ¶
func (*SuspendRequest) ProtoMessage()
func (*SuspendRequest) ProtoReflect ¶
func (x *SuspendRequest) ProtoReflect() protoreflect.Message
func (*SuspendRequest) Reset ¶
func (x *SuspendRequest) Reset()
func (*SuspendRequest) String ¶
func (x *SuspendRequest) String() string
type UnimplementedInstanceServer ¶
type UnimplementedInstanceServer struct{}
UnimplementedInstanceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedInstanceServer) Create ¶
func (UnimplementedInstanceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedInstanceServer) Handle ¶
func (UnimplementedInstanceServer) Handle(context.Context, *HandleRequest) (*emptypb.Empty, error)
func (UnimplementedInstanceServer) Receive ¶
func (UnimplementedInstanceServer) Receive(*ReceiveRequest, grpc.ServerStreamingServer[wrapperspb.BytesValue]) error
func (UnimplementedInstanceServer) Shutdown ¶
func (UnimplementedInstanceServer) Shutdown(context.Context, *ShutdownRequest) (*emptypb.Empty, error)
func (UnimplementedInstanceServer) Snapshot ¶
func (UnimplementedInstanceServer) Snapshot(context.Context, *SnapshotRequest) (*wrapperspb.BytesValue, error)
func (UnimplementedInstanceServer) Suspend ¶
func (UnimplementedInstanceServer) Suspend(context.Context, *SuspendRequest) (*emptypb.Empty, error)
type UnimplementedRootServer ¶
type UnimplementedRootServer struct{}
UnimplementedRootServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedRootServer) Init ¶
func (UnimplementedRootServer) Init(context.Context, *InitRequest) (*InitResponse, error)
type UnsafeInstanceServer ¶
type UnsafeInstanceServer interface {
// contains filtered or unexported methods
}
UnsafeInstanceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InstanceServer will result in compilation errors.
type UnsafeRootServer ¶
type UnsafeRootServer interface {
// contains filtered or unexported methods
}
UnsafeRootServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RootServer will result in compilation errors.