pb
v0.0.0-20260210234752-80bdd1704a23
Documentation
pkg.go.dev ↗Constants
Instance_Create_FullMethodName (6 declarations)
const ( Instance_Create_FullMethodName = "/gate.grpc.Instance/Create" Instance_Receive_FullMethodName = "/gate.grpc.Instance/Receive" Instance_Handle_FullMethodName = "/gate.grpc.Instance/Handle" Instance_Shutdown_FullMethodName = "/gate.grpc.Instance/Shutdown" Instance_Suspend_FullMethodName = "/gate.grpc.Instance/Suspend" Instance_Snapshot_FullMethodName = "/gate.grpc.Instance/Snapshot" )
Root_Init_FullMethodName
const ( Root_Init_FullMethodName = "/gate.grpc.Root/Init" )
Variables
File_grpc_pb_service_proto
var File_grpc_pb_service_proto protoreflect.FileDescriptor
Instance_ServiceDesc
var Instance_ServiceDesc = grpc.ServiceDesc{
ServiceName: "gate.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: "grpc/pb/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)
Root_ServiceDesc
var Root_ServiceDesc = grpc.ServiceDesc{
ServiceName: "gate.grpc.Root",
HandlerType: (*RootServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Init",
Handler: _Root_Init_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "grpc/pb/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
RegisterInstanceServer
func RegisterInstanceServer(s grpc.ServiceRegistrar, srv InstanceServer)
RegisterRootServer
func RegisterRootServer(s grpc.ServiceRegistrar, srv RootServer)
Types
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
}
CreateRequest.Descriptor
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
CreateRequest.GetConfig
func (x *CreateRequest) GetConfig() *InstanceConfig
CreateRequest.GetServiceName
func (x *CreateRequest) GetServiceName() string
CreateRequest.GetSnapshot
func (x *CreateRequest) GetSnapshot() []byte
CreateRequest.ProtoMessage
func (*CreateRequest) ProtoMessage()
CreateRequest.ProtoReflect
func (x *CreateRequest) ProtoReflect() protoreflect.Message
CreateRequest.Reset
func (x *CreateRequest) Reset()
CreateRequest.String
func (x *CreateRequest) String() string
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
}
CreateResponse.Descriptor
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
CreateResponse.GetId
func (x *CreateResponse) GetId() []byte
CreateResponse.GetRestorationError
func (x *CreateResponse) GetRestorationError() string
CreateResponse.ProtoMessage
func (*CreateResponse) ProtoMessage()
CreateResponse.ProtoReflect
func (x *CreateResponse) ProtoReflect() protoreflect.Message
CreateResponse.Reset
func (x *CreateResponse) Reset()
CreateResponse.String
func (x *CreateResponse) String() string
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
}
HandleRequest.Descriptor
func (*HandleRequest) Descriptor() ([]byte, []int)
Deprecated: Use HandleRequest.ProtoReflect.Descriptor instead.
HandleRequest.GetData
func (x *HandleRequest) GetData() []byte
HandleRequest.GetId
func (x *HandleRequest) GetId() []byte
HandleRequest.ProtoMessage
func (*HandleRequest) ProtoMessage()
HandleRequest.ProtoReflect
func (x *HandleRequest) ProtoReflect() protoreflect.Message
HandleRequest.Reset
func (x *HandleRequest) Reset()
HandleRequest.String
func (x *HandleRequest) String() string
InitRequest
type InitRequest struct {
// contains filtered or unexported fields
}
InitRequest.Descriptor
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
InitRequest.ProtoMessage
func (*InitRequest) ProtoMessage()
InitRequest.ProtoReflect
func (x *InitRequest) ProtoReflect() protoreflect.Message
InitRequest.Reset
func (x *InitRequest) Reset()
InitRequest.String
func (x *InitRequest) String() string
InitResponse
type InitResponse struct {
Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
// contains filtered or unexported fields
}
InitResponse.Descriptor
func (*InitResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.
InitResponse.GetServices
func (x *InitResponse) GetServices() []*Service
InitResponse.ProtoMessage
func (*InitResponse) ProtoMessage()
InitResponse.ProtoReflect
func (x *InitResponse) ProtoReflect() protoreflect.Message
InitResponse.Reset
func (x *InitResponse) Reset()
InitResponse.String
func (x *InitResponse) String() string
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.
NewInstanceClient
func NewInstanceClient(cc grpc.ClientConnInterface) InstanceClient
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
}
InstanceConfig.Descriptor
func (*InstanceConfig) Descriptor() ([]byte, []int)
Deprecated: Use InstanceConfig.ProtoReflect.Descriptor instead.
InstanceConfig.GetInstanceUuid
func (x *InstanceConfig) GetInstanceUuid() []byte
InstanceConfig.GetMaxSendSize
func (x *InstanceConfig) GetMaxSendSize() int32
InstanceConfig.GetPrincipalId
func (x *InstanceConfig) GetPrincipalId() string
InstanceConfig.GetProcessKey
func (x *InstanceConfig) GetProcessKey() []byte
InstanceConfig.ProtoMessage
func (*InstanceConfig) ProtoMessage()
InstanceConfig.ProtoReflect
func (x *InstanceConfig) ProtoReflect() protoreflect.Message
InstanceConfig.Reset
func (x *InstanceConfig) Reset()
InstanceConfig.String
func (x *InstanceConfig) String() string
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.
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.
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.
ReceiveRequest
type ReceiveRequest struct {
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
ReceiveRequest.Descriptor
func (*ReceiveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.
ReceiveRequest.GetId
func (x *ReceiveRequest) GetId() []byte
ReceiveRequest.ProtoMessage
func (*ReceiveRequest) ProtoMessage()
ReceiveRequest.ProtoReflect
func (x *ReceiveRequest) ProtoReflect() protoreflect.Message
ReceiveRequest.Reset
func (x *ReceiveRequest) Reset()
ReceiveRequest.String
func (x *ReceiveRequest) String() string
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.
NewRootClient
func NewRootClient(cc grpc.ClientConnInterface) RootClient
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.
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
}
Service.Descriptor
func (*Service) Descriptor() ([]byte, []int)
Deprecated: Use Service.ProtoReflect.Descriptor instead.
Service.GetName
func (x *Service) GetName() string
Service.GetRequirePrincipal
func (x *Service) GetRequirePrincipal() bool
Service.GetRevision
func (x *Service) GetRevision() string
Service.ProtoMessage
func (*Service) ProtoMessage()
Service.ProtoReflect
func (x *Service) ProtoReflect() protoreflect.Message
Service.Reset
func (x *Service) Reset()
Service.String
func (x *Service) String() string
ShutdownRequest
type ShutdownRequest struct {
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
ShutdownRequest.Descriptor
func (*ShutdownRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShutdownRequest.ProtoReflect.Descriptor instead.
ShutdownRequest.GetId
func (x *ShutdownRequest) GetId() []byte
ShutdownRequest.ProtoMessage
func (*ShutdownRequest) ProtoMessage()
ShutdownRequest.ProtoReflect
func (x *ShutdownRequest) ProtoReflect() protoreflect.Message
ShutdownRequest.Reset
func (x *ShutdownRequest) Reset()
ShutdownRequest.String
func (x *ShutdownRequest) String() string
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
}
SnapshotRequest.Descriptor
func (*SnapshotRequest) Descriptor() ([]byte, []int)
Deprecated: Use SnapshotRequest.ProtoReflect.Descriptor instead.
SnapshotRequest.GetId
func (x *SnapshotRequest) GetId() []byte
SnapshotRequest.GetIncoming
func (x *SnapshotRequest) GetIncoming() []byte
SnapshotRequest.GetOutgoing
func (x *SnapshotRequest) GetOutgoing() []byte
SnapshotRequest.ProtoMessage
func (*SnapshotRequest) ProtoMessage()
SnapshotRequest.ProtoReflect
func (x *SnapshotRequest) ProtoReflect() protoreflect.Message
SnapshotRequest.Reset
func (x *SnapshotRequest) Reset()
SnapshotRequest.String
func (x *SnapshotRequest) String() string
SuspendRequest
type SuspendRequest struct {
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
SuspendRequest.Descriptor
func (*SuspendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SuspendRequest.ProtoReflect.Descriptor instead.
SuspendRequest.GetId
func (x *SuspendRequest) GetId() []byte
SuspendRequest.ProtoMessage
func (*SuspendRequest) ProtoMessage()
SuspendRequest.ProtoReflect
func (x *SuspendRequest) ProtoReflect() protoreflect.Message
SuspendRequest.Reset
func (x *SuspendRequest) Reset()
SuspendRequest.String
func (x *SuspendRequest) String() string
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.
UnimplementedInstanceServer.Create
func (UnimplementedInstanceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
UnimplementedInstanceServer.Handle
func (UnimplementedInstanceServer) Handle(context.Context, *HandleRequest) (*emptypb.Empty, error)
UnimplementedInstanceServer.Receive
func (UnimplementedInstanceServer) Receive(*ReceiveRequest, grpc.ServerStreamingServer[wrapperspb.BytesValue]) error
UnimplementedInstanceServer.Shutdown
func (UnimplementedInstanceServer) Shutdown(context.Context, *ShutdownRequest) (*emptypb.Empty, error)
UnimplementedInstanceServer.Snapshot
func (UnimplementedInstanceServer) Snapshot(context.Context, *SnapshotRequest) (*wrapperspb.BytesValue, error)
UnimplementedInstanceServer.Suspend
func (UnimplementedInstanceServer) Suspend(context.Context, *SuspendRequest) (*emptypb.Empty, error)
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.
UnimplementedRootServer.Init
func (UnimplementedRootServer) Init(context.Context, *InitRequest) (*InitResponse, error)
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.
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.