Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterInternalServer(s grpc.ServiceRegistrar, srv InternalServer)
- type AddRequest
- func (*AddRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddRequest) GetHostId() string
- func (x *AddRequest) GetIsNonVoting() bool
- func (x *AddRequest) GetReplicaId() uint64
- func (x *AddRequest) GetShardId() uint64
- func (*AddRequest) ProtoMessage()
- func (x *AddRequest) ProtoReflect() protoreflect.Message
- func (x *AddRequest) Reset()
- func (x *AddRequest) String() string
- type AddResponse
- type ApplyRequest
- func (*ApplyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyRequest) GetData() []byte
- func (x *ApplyRequest) GetShardId() uint64
- func (*ApplyRequest) ProtoMessage()
- func (x *ApplyRequest) ProtoReflect() protoreflect.Message
- func (x *ApplyRequest) Reset()
- func (x *ApplyRequest) String() string
- type ApplyResponse
- func (*ApplyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ApplyResponse) GetData() []byte
- func (x *ApplyResponse) GetValue() uint64
- func (*ApplyResponse) ProtoMessage()
- func (x *ApplyResponse) ProtoReflect() protoreflect.Message
- func (x *ApplyResponse) Reset()
- func (x *ApplyResponse) String() string
- type CommitRequest
- func (*CommitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommitRequest) GetData() []byte
- func (x *CommitRequest) GetShardId() uint64
- func (*CommitRequest) ProtoMessage()
- func (x *CommitRequest) ProtoReflect() protoreflect.Message
- func (x *CommitRequest) Reset()
- func (x *CommitRequest) String() string
- type CommitResponse
- type IndexRequest
- type IndexResponse
- type InfoRequest
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetHostId() string
- func (x *InfoResponse) GetReplicaId() uint64
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- type InternalClient
- type InternalServer
- type Internal_StreamClient
- type Internal_StreamServer
- type Internal_WatchClient
- type Internal_WatchServer
- type JoinRequest
- func (*JoinRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JoinRequest) GetHostId() string
- func (x *JoinRequest) GetIsNonVoting() bool
- func (*JoinRequest) ProtoMessage()
- func (x *JoinRequest) ProtoReflect() protoreflect.Message
- func (x *JoinRequest) Reset()
- func (x *JoinRequest) String() string
- type JoinResponse
- func (*JoinResponse) Descriptor() ([]byte, []int)deprecated
- func (x *JoinResponse) GetError() string
- func (x *JoinResponse) GetValue() uint64
- func (*JoinResponse) ProtoMessage()
- func (x *JoinResponse) ProtoReflect() protoreflect.Message
- func (x *JoinResponse) Reset()
- func (x *JoinResponse) String() string
- type MembersRequest
- type MembersResponse
- type PingRequest
- type PingResponse
- type ProbeRequest
- type ProbeResponse
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetData() []byte
- func (x *ReadRequest) GetShardId() uint64
- func (x *ReadRequest) GetStale() bool
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadResponse
- func (*ReadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadResponse) GetData() []byte
- func (x *ReadResponse) GetValue() uint64
- func (*ReadResponse) ProtoMessage()
- func (x *ReadResponse) ProtoReflect() protoreflect.Message
- func (x *ReadResponse) Reset()
- func (x *ReadResponse) String() string
- type StreamConnect
- func (*StreamConnect) Descriptor() ([]byte, []int)deprecated
- func (x *StreamConnect) GetShardId() uint64
- func (x *StreamConnect) GetStale() bool
- func (*StreamConnect) ProtoMessage()
- func (x *StreamConnect) ProtoReflect() protoreflect.Message
- func (x *StreamConnect) Reset()
- func (x *StreamConnect) String() string
- type StreamMessage
- func (*StreamMessage) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMessage) GetData() []byte
- func (x *StreamMessage) GetShardId() uint64
- func (*StreamMessage) ProtoMessage()
- func (x *StreamMessage) ProtoReflect() protoreflect.Message
- func (x *StreamMessage) Reset()
- func (x *StreamMessage) String() string
- type StreamRequest
- func (*StreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamRequest) GetRequestUnion() isStreamRequest_RequestUnion
- func (x *StreamRequest) GetStreamConnect() *StreamConnect
- func (x *StreamRequest) GetStreamMessage() *StreamMessage
- func (*StreamRequest) ProtoMessage()
- func (x *StreamRequest) ProtoReflect() protoreflect.Message
- func (x *StreamRequest) Reset()
- func (x *StreamRequest) String() string
- type StreamRequest_StreamConnect
- type StreamRequest_StreamMessage
- type StreamResponse
- func (*StreamResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamResponse) GetData() []byte
- func (x *StreamResponse) GetValue() uint64
- func (*StreamResponse) ProtoMessage()
- func (x *StreamResponse) ProtoReflect() protoreflect.Message
- func (x *StreamResponse) Reset()
- func (x *StreamResponse) String() string
- type UnimplementedInternalServer
- func (UnimplementedInternalServer) Add(context.Context, *AddRequest) (*AddResponse, error)
- func (UnimplementedInternalServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
- func (UnimplementedInternalServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
- func (UnimplementedInternalServer) Index(context.Context, *IndexRequest) (*IndexResponse, error)
- func (UnimplementedInternalServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
- func (UnimplementedInternalServer) Join(context.Context, *JoinRequest) (*JoinResponse, error)
- func (UnimplementedInternalServer) Members(context.Context, *MembersRequest) (*MembersResponse, error)
- func (UnimplementedInternalServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedInternalServer) Probe(context.Context, *ProbeRequest) (*ProbeResponse, error)
- func (UnimplementedInternalServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
- func (UnimplementedInternalServer) Stream(grpc.BidiStreamingServer[StreamRequest, StreamResponse]) error
- func (UnimplementedInternalServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
- type UnsafeInternalServer
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetData() []byte
- func (x *WatchRequest) GetShardId() uint64
- func (x *WatchRequest) GetStale() bool
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
- type WatchResponse
- func (*WatchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchResponse) GetData() []byte
- func (x *WatchResponse) GetValue() uint64
- func (*WatchResponse) ProtoMessage()
- func (x *WatchResponse) ProtoReflect() protoreflect.Message
- func (x *WatchResponse) Reset()
- func (x *WatchResponse) String() string
Constants ¶
const ( Internal_Ping_FullMethodName = "/zongzi.Internal/Ping" Internal_Probe_FullMethodName = "/zongzi.Internal/Probe" Internal_Info_FullMethodName = "/zongzi.Internal/Info" Internal_Members_FullMethodName = "/zongzi.Internal/Members" Internal_Join_FullMethodName = "/zongzi.Internal/Join" Internal_Add_FullMethodName = "/zongzi.Internal/Add" Internal_Index_FullMethodName = "/zongzi.Internal/Index" Internal_Apply_FullMethodName = "/zongzi.Internal/Apply" Internal_Commit_FullMethodName = "/zongzi.Internal/Commit" Internal_Read_FullMethodName = "/zongzi.Internal/Read" Internal_Watch_FullMethodName = "/zongzi.Internal/Watch" Internal_Stream_FullMethodName = "/zongzi.Internal/Stream" )
Variables ¶
var File_zongzi_proto protoreflect.FileDescriptor
var Internal_ServiceDesc = grpc.ServiceDesc{ ServiceName: "zongzi.Internal", HandlerType: (*InternalServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Internal_Ping_Handler, }, { MethodName: "Probe", Handler: _Internal_Probe_Handler, }, { MethodName: "Info", Handler: _Internal_Info_Handler, }, { MethodName: "Members", Handler: _Internal_Members_Handler, }, { MethodName: "Join", Handler: _Internal_Join_Handler, }, { MethodName: "Add", Handler: _Internal_Add_Handler, }, { MethodName: "Index", Handler: _Internal_Index_Handler, }, { MethodName: "Apply", Handler: _Internal_Apply_Handler, }, { MethodName: "Commit", Handler: _Internal_Commit_Handler, }, { MethodName: "Read", Handler: _Internal_Read_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Internal_Watch_Handler, ServerStreams: true, }, { StreamName: "Stream", Handler: _Internal_Stream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "zongzi.proto", }
Internal_ServiceDesc is the grpc.ServiceDesc for Internal service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInternalServer ¶ added in v0.0.9
func RegisterInternalServer(s grpc.ServiceRegistrar, srv InternalServer)
Types ¶
type AddRequest ¶ added in v0.0.10
type AddRequest struct {
HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
ShardId uint64 `protobuf:"varint,2,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
ReplicaId uint64 `protobuf:"varint,3,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
IsNonVoting bool `protobuf:"varint,4,opt,name=is_non_voting,json=isNonVoting,proto3" json:"is_non_voting,omitempty"`
// contains filtered or unexported fields
}
func (*AddRequest) Descriptor
deprecated
added in
v0.0.10
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetHostId ¶ added in v0.0.10
func (x *AddRequest) GetHostId() string
func (*AddRequest) GetIsNonVoting ¶ added in v0.0.10
func (x *AddRequest) GetIsNonVoting() bool
func (*AddRequest) GetReplicaId ¶ added in v0.0.10
func (x *AddRequest) GetReplicaId() uint64
func (*AddRequest) GetShardId ¶ added in v0.0.10
func (x *AddRequest) GetShardId() uint64
func (*AddRequest) ProtoMessage ¶ added in v0.0.10
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶ added in v0.0.10
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶ added in v0.0.10
func (x *AddRequest) Reset()
func (*AddRequest) String ¶ added in v0.0.10
func (x *AddRequest) String() string
type AddResponse ¶ added in v0.0.10
type AddResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*AddResponse) Descriptor
deprecated
added in
v0.0.10
func (*AddResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
func (*AddResponse) GetError ¶ added in v0.0.10
func (x *AddResponse) GetError() string
func (*AddResponse) GetValue ¶ added in v0.0.10
func (x *AddResponse) GetValue() uint64
func (*AddResponse) ProtoMessage ¶ added in v0.0.10
func (*AddResponse) ProtoMessage()
func (*AddResponse) ProtoReflect ¶ added in v0.0.10
func (x *AddResponse) ProtoReflect() protoreflect.Message
func (*AddResponse) Reset ¶ added in v0.0.10
func (x *AddResponse) Reset()
func (*AddResponse) String ¶ added in v0.0.10
func (x *AddResponse) String() string
type ApplyRequest ¶ added in v0.0.5
type ApplyRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ApplyRequest) Descriptor
deprecated
added in
v0.0.5
func (*ApplyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplyRequest.ProtoReflect.Descriptor instead.
func (*ApplyRequest) GetData ¶ added in v0.0.5
func (x *ApplyRequest) GetData() []byte
func (*ApplyRequest) GetShardId ¶ added in v0.0.5
func (x *ApplyRequest) GetShardId() uint64
func (*ApplyRequest) ProtoMessage ¶ added in v0.0.5
func (*ApplyRequest) ProtoMessage()
func (*ApplyRequest) ProtoReflect ¶ added in v0.0.5
func (x *ApplyRequest) ProtoReflect() protoreflect.Message
func (*ApplyRequest) Reset ¶ added in v0.0.5
func (x *ApplyRequest) Reset()
func (*ApplyRequest) String ¶ added in v0.0.5
func (x *ApplyRequest) String() string
type ApplyResponse ¶ added in v0.0.5
type ApplyResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ApplyResponse) Descriptor
deprecated
added in
v0.0.5
func (*ApplyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ApplyResponse.ProtoReflect.Descriptor instead.
func (*ApplyResponse) GetData ¶ added in v0.0.5
func (x *ApplyResponse) GetData() []byte
func (*ApplyResponse) GetValue ¶ added in v0.0.5
func (x *ApplyResponse) GetValue() uint64
func (*ApplyResponse) ProtoMessage ¶ added in v0.0.5
func (*ApplyResponse) ProtoMessage()
func (*ApplyResponse) ProtoReflect ¶ added in v0.0.5
func (x *ApplyResponse) ProtoReflect() protoreflect.Message
func (*ApplyResponse) Reset ¶ added in v0.0.5
func (x *ApplyResponse) Reset()
func (*ApplyResponse) String ¶ added in v0.0.5
func (x *ApplyResponse) String() string
type CommitRequest ¶ added in v0.0.5
type CommitRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*CommitRequest) Descriptor
deprecated
added in
v0.0.5
func (*CommitRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.
func (*CommitRequest) GetData ¶ added in v0.0.5
func (x *CommitRequest) GetData() []byte
func (*CommitRequest) GetShardId ¶ added in v0.0.5
func (x *CommitRequest) GetShardId() uint64
func (*CommitRequest) ProtoMessage ¶ added in v0.0.5
func (*CommitRequest) ProtoMessage()
func (*CommitRequest) ProtoReflect ¶ added in v0.0.5
func (x *CommitRequest) ProtoReflect() protoreflect.Message
func (*CommitRequest) Reset ¶ added in v0.0.5
func (x *CommitRequest) Reset()
func (*CommitRequest) String ¶ added in v0.0.5
func (x *CommitRequest) String() string
type CommitResponse ¶ added in v0.0.5
type CommitResponse struct {
// contains filtered or unexported fields
}
func (*CommitResponse) Descriptor
deprecated
added in
v0.0.5
func (*CommitResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.
func (*CommitResponse) ProtoMessage ¶ added in v0.0.5
func (*CommitResponse) ProtoMessage()
func (*CommitResponse) ProtoReflect ¶ added in v0.0.5
func (x *CommitResponse) ProtoReflect() protoreflect.Message
func (*CommitResponse) Reset ¶ added in v0.0.5
func (x *CommitResponse) Reset()
func (*CommitResponse) String ¶ added in v0.0.5
func (x *CommitResponse) String() string
type IndexRequest ¶ added in v0.0.10
type IndexRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
// contains filtered or unexported fields
}
func (*IndexRequest) Descriptor
deprecated
added in
v0.0.10
func (*IndexRequest) Descriptor() ([]byte, []int)
Deprecated: Use IndexRequest.ProtoReflect.Descriptor instead.
func (*IndexRequest) GetShardId ¶ added in v0.0.10
func (x *IndexRequest) GetShardId() uint64
func (*IndexRequest) ProtoMessage ¶ added in v0.0.10
func (*IndexRequest) ProtoMessage()
func (*IndexRequest) ProtoReflect ¶ added in v0.0.10
func (x *IndexRequest) ProtoReflect() protoreflect.Message
func (*IndexRequest) Reset ¶ added in v0.0.10
func (x *IndexRequest) Reset()
func (*IndexRequest) String ¶ added in v0.0.10
func (x *IndexRequest) String() string
type IndexResponse ¶ added in v0.0.10
type IndexResponse struct {
// contains filtered or unexported fields
}
func (*IndexResponse) Descriptor
deprecated
added in
v0.0.10
func (*IndexResponse) Descriptor() ([]byte, []int)
Deprecated: Use IndexResponse.ProtoReflect.Descriptor instead.
func (*IndexResponse) ProtoMessage ¶ added in v0.0.10
func (*IndexResponse) ProtoMessage()
func (*IndexResponse) ProtoReflect ¶ added in v0.0.10
func (x *IndexResponse) ProtoReflect() protoreflect.Message
func (*IndexResponse) Reset ¶ added in v0.0.10
func (x *IndexResponse) Reset()
func (*IndexResponse) String ¶ added in v0.0.10
func (x *IndexResponse) String() string
type InfoRequest ¶
type InfoRequest struct {
// contains filtered or unexported fields
}
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type InfoResponse ¶
type InfoResponse struct {
HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
ReplicaId uint64 `protobuf:"varint,2,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
// contains filtered or unexported fields
}
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetHostId ¶
func (x *InfoResponse) GetHostId() string
func (*InfoResponse) GetReplicaId ¶
func (x *InfoResponse) GetReplicaId() uint64
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
type InternalClient ¶ added in v0.0.9
type InternalClient interface {
// Ping is a noop for timing purposes
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
// Probe returns Gossip.AdvertiseAddress
// Used by new hosts to start dragonboat
Probe(ctx context.Context, in *ProbeRequest, opts ...grpc.CallOption) (*ProbeResponse, error)
// Info returns zero shard replicaID and hostID
// Used by new hosts to discover zero shard replicas
Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
// Members returns json marshaled map of member zero shard replicaID to hostID
// Used by new hosts joining a bootstrapped zero shard
Members(ctx context.Context, in *MembersRequest, opts ...grpc.CallOption) (*MembersResponse, error)
// Join takes a host ID and returns success
// Used by joining hosts to request their own addition to the zero shard
Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error)
// Add takes a replica ID, shard ID and host ID and returns success
// Used during replica creation to request replica's addition to the shard
Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
// Index reads the index of a shard
Index(ctx context.Context, in *IndexRequest, opts ...grpc.CallOption) (*IndexResponse, error)
// Apply provides unary request/response command forwarding
Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
// Commit provides unary request/response command forwarding
Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error)
// Read provides unary request/response query forwarding
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
// Watch provides streaming query response forwarding
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchResponse], error)
// Stream provides streaming proposal forwarding
Stream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamRequest, StreamResponse], error)
}
InternalClient is the client API for Internal 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.
Zongzi uses an internal gRPC service for cluster coordination
func NewInternalClient ¶ added in v0.0.9
func NewInternalClient(cc grpc.ClientConnInterface) InternalClient
type InternalServer ¶ added in v0.0.9
type InternalServer interface {
// Ping is a noop for timing purposes
Ping(context.Context, *PingRequest) (*PingResponse, error)
// Probe returns Gossip.AdvertiseAddress
// Used by new hosts to start dragonboat
Probe(context.Context, *ProbeRequest) (*ProbeResponse, error)
// Info returns zero shard replicaID and hostID
// Used by new hosts to discover zero shard replicas
Info(context.Context, *InfoRequest) (*InfoResponse, error)
// Members returns json marshaled map of member zero shard replicaID to hostID
// Used by new hosts joining a bootstrapped zero shard
Members(context.Context, *MembersRequest) (*MembersResponse, error)
// Join takes a host ID and returns success
// Used by joining hosts to request their own addition to the zero shard
Join(context.Context, *JoinRequest) (*JoinResponse, error)
// Add takes a replica ID, shard ID and host ID and returns success
// Used during replica creation to request replica's addition to the shard
Add(context.Context, *AddRequest) (*AddResponse, error)
// Index reads the index of a shard
Index(context.Context, *IndexRequest) (*IndexResponse, error)
// Apply provides unary request/response command forwarding
Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
// Commit provides unary request/response command forwarding
Commit(context.Context, *CommitRequest) (*CommitResponse, error)
// Read provides unary request/response query forwarding
Read(context.Context, *ReadRequest) (*ReadResponse, error)
// Watch provides streaming query response forwarding
Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
// Stream provides streaming proposal forwarding
Stream(grpc.BidiStreamingServer[StreamRequest, StreamResponse]) error
// contains filtered or unexported methods
}
InternalServer is the server API for Internal service. All implementations must embed UnimplementedInternalServer for forward compatibility.
Zongzi uses an internal gRPC service for cluster coordination
type Internal_StreamClient ¶ added in v0.0.21
type Internal_StreamClient = grpc.BidiStreamingClient[StreamRequest, StreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Internal_StreamServer ¶ added in v0.0.21
type Internal_StreamServer = grpc.BidiStreamingServer[StreamRequest, StreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Internal_WatchClient ¶ added in v0.0.9
type Internal_WatchClient = grpc.ServerStreamingClient[WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Internal_WatchServer ¶ added in v0.0.9
type Internal_WatchServer = grpc.ServerStreamingServer[WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type JoinRequest ¶
type JoinRequest struct {
HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
IsNonVoting bool `protobuf:"varint,2,opt,name=is_non_voting,json=isNonVoting,proto3" json:"is_non_voting,omitempty"`
// contains filtered or unexported fields
}
func (*JoinRequest) Descriptor
deprecated
func (*JoinRequest) Descriptor() ([]byte, []int)
Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.
func (*JoinRequest) GetHostId ¶
func (x *JoinRequest) GetHostId() string
func (*JoinRequest) GetIsNonVoting ¶
func (x *JoinRequest) GetIsNonVoting() bool
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) ProtoReflect ¶
func (x *JoinRequest) ProtoReflect() protoreflect.Message
func (*JoinRequest) Reset ¶
func (x *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (x *JoinRequest) String() string
type JoinResponse ¶
type JoinResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*JoinResponse) Descriptor
deprecated
func (*JoinResponse) Descriptor() ([]byte, []int)
Deprecated: Use JoinResponse.ProtoReflect.Descriptor instead.
func (*JoinResponse) GetError ¶
func (x *JoinResponse) GetError() string
func (*JoinResponse) GetValue ¶
func (x *JoinResponse) GetValue() uint64
func (*JoinResponse) ProtoMessage ¶
func (*JoinResponse) ProtoMessage()
func (*JoinResponse) ProtoReflect ¶
func (x *JoinResponse) ProtoReflect() protoreflect.Message
func (*JoinResponse) Reset ¶
func (x *JoinResponse) Reset()
func (*JoinResponse) String ¶
func (x *JoinResponse) String() string
type MembersRequest ¶
type MembersRequest struct {
// contains filtered or unexported fields
}
func (*MembersRequest) Descriptor
deprecated
func (*MembersRequest) Descriptor() ([]byte, []int)
Deprecated: Use MembersRequest.ProtoReflect.Descriptor instead.
func (*MembersRequest) ProtoMessage ¶
func (*MembersRequest) ProtoMessage()
func (*MembersRequest) ProtoReflect ¶
func (x *MembersRequest) ProtoReflect() protoreflect.Message
func (*MembersRequest) Reset ¶
func (x *MembersRequest) Reset()
func (*MembersRequest) String ¶
func (x *MembersRequest) String() string
type MembersResponse ¶
type MembersResponse struct {
Members map[uint64]string `` /* 142-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*MembersResponse) Descriptor
deprecated
func (*MembersResponse) Descriptor() ([]byte, []int)
Deprecated: Use MembersResponse.ProtoReflect.Descriptor instead.
func (*MembersResponse) GetMembers ¶
func (x *MembersResponse) GetMembers() map[uint64]string
func (*MembersResponse) ProtoMessage ¶
func (*MembersResponse) ProtoMessage()
func (*MembersResponse) ProtoReflect ¶
func (x *MembersResponse) ProtoReflect() protoreflect.Message
func (*MembersResponse) Reset ¶
func (x *MembersResponse) Reset()
func (*MembersResponse) String ¶
func (x *MembersResponse) String() string
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
// contains filtered or unexported fields
}
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type ProbeRequest ¶
type ProbeRequest struct {
// contains filtered or unexported fields
}
func (*ProbeRequest) Descriptor
deprecated
func (*ProbeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProbeRequest.ProtoReflect.Descriptor instead.
func (*ProbeRequest) ProtoMessage ¶
func (*ProbeRequest) ProtoMessage()
func (*ProbeRequest) ProtoReflect ¶
func (x *ProbeRequest) ProtoReflect() protoreflect.Message
func (*ProbeRequest) Reset ¶
func (x *ProbeRequest) Reset()
func (*ProbeRequest) String ¶
func (x *ProbeRequest) String() string
type ProbeResponse ¶
type ProbeResponse struct {
GossipAdvertiseAddress string `` /* 129-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*ProbeResponse) Descriptor
deprecated
func (*ProbeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProbeResponse.ProtoReflect.Descriptor instead.
func (*ProbeResponse) GetGossipAdvertiseAddress ¶
func (x *ProbeResponse) GetGossipAdvertiseAddress() string
func (*ProbeResponse) ProtoMessage ¶
func (*ProbeResponse) ProtoMessage()
func (*ProbeResponse) ProtoReflect ¶
func (x *ProbeResponse) ProtoReflect() protoreflect.Message
func (*ProbeResponse) Reset ¶
func (x *ProbeResponse) Reset()
func (*ProbeResponse) String ¶
func (x *ProbeResponse) String() string
type ReadRequest ¶ added in v0.0.9
type ReadRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Stale bool `protobuf:"varint,2,opt,name=stale,proto3" json:"stale,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ReadRequest) Descriptor
deprecated
added in
v0.0.9
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetData ¶ added in v0.0.9
func (x *ReadRequest) GetData() []byte
func (*ReadRequest) GetShardId ¶ added in v0.0.9
func (x *ReadRequest) GetShardId() uint64
func (*ReadRequest) GetStale ¶ added in v0.0.9
func (x *ReadRequest) GetStale() bool
func (*ReadRequest) ProtoMessage ¶ added in v0.0.9
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶ added in v0.0.9
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶ added in v0.0.9
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶ added in v0.0.9
func (x *ReadRequest) String() string
type ReadResponse ¶ added in v0.0.9
type ReadResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ReadResponse) Descriptor
deprecated
added in
v0.0.9
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetData ¶ added in v0.0.9
func (x *ReadResponse) GetData() []byte
func (*ReadResponse) GetValue ¶ added in v0.0.9
func (x *ReadResponse) GetValue() uint64
func (*ReadResponse) ProtoMessage ¶ added in v0.0.9
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶ added in v0.0.9
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶ added in v0.0.9
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶ added in v0.0.9
func (x *ReadResponse) String() string
type StreamConnect ¶ added in v0.0.21
type StreamConnect struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Stale bool `protobuf:"varint,2,opt,name=stale,proto3" json:"stale,omitempty"`
// contains filtered or unexported fields
}
func (*StreamConnect) Descriptor
deprecated
added in
v0.0.21
func (*StreamConnect) Descriptor() ([]byte, []int)
Deprecated: Use StreamConnect.ProtoReflect.Descriptor instead.
func (*StreamConnect) GetShardId ¶ added in v0.0.21
func (x *StreamConnect) GetShardId() uint64
func (*StreamConnect) GetStale ¶ added in v0.0.21
func (x *StreamConnect) GetStale() bool
func (*StreamConnect) ProtoMessage ¶ added in v0.0.21
func (*StreamConnect) ProtoMessage()
func (*StreamConnect) ProtoReflect ¶ added in v0.0.21
func (x *StreamConnect) ProtoReflect() protoreflect.Message
func (*StreamConnect) Reset ¶ added in v0.0.21
func (x *StreamConnect) Reset()
func (*StreamConnect) String ¶ added in v0.0.21
func (x *StreamConnect) String() string
type StreamMessage ¶ added in v0.0.21
type StreamMessage struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*StreamMessage) Descriptor
deprecated
added in
v0.0.21
func (*StreamMessage) Descriptor() ([]byte, []int)
Deprecated: Use StreamMessage.ProtoReflect.Descriptor instead.
func (*StreamMessage) GetData ¶ added in v0.0.21
func (x *StreamMessage) GetData() []byte
func (*StreamMessage) GetShardId ¶ added in v0.0.21
func (x *StreamMessage) GetShardId() uint64
func (*StreamMessage) ProtoMessage ¶ added in v0.0.21
func (*StreamMessage) ProtoMessage()
func (*StreamMessage) ProtoReflect ¶ added in v0.0.21
func (x *StreamMessage) ProtoReflect() protoreflect.Message
func (*StreamMessage) Reset ¶ added in v0.0.21
func (x *StreamMessage) Reset()
func (*StreamMessage) String ¶ added in v0.0.21
func (x *StreamMessage) String() string
type StreamRequest ¶ added in v0.0.21
type StreamRequest struct {
// Types that are valid to be assigned to RequestUnion:
//
// *StreamRequest_StreamConnect
// *StreamRequest_StreamMessage
RequestUnion isStreamRequest_RequestUnion `protobuf_oneof:"request_union"`
// contains filtered or unexported fields
}
func (*StreamRequest) Descriptor
deprecated
added in
v0.0.21
func (*StreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.
func (*StreamRequest) GetRequestUnion ¶ added in v0.0.21
func (x *StreamRequest) GetRequestUnion() isStreamRequest_RequestUnion
func (*StreamRequest) GetStreamConnect ¶ added in v0.0.21
func (x *StreamRequest) GetStreamConnect() *StreamConnect
func (*StreamRequest) GetStreamMessage ¶ added in v0.0.21
func (x *StreamRequest) GetStreamMessage() *StreamMessage
func (*StreamRequest) ProtoMessage ¶ added in v0.0.21
func (*StreamRequest) ProtoMessage()
func (*StreamRequest) ProtoReflect ¶ added in v0.0.21
func (x *StreamRequest) ProtoReflect() protoreflect.Message
func (*StreamRequest) Reset ¶ added in v0.0.21
func (x *StreamRequest) Reset()
func (*StreamRequest) String ¶ added in v0.0.21
func (x *StreamRequest) String() string
type StreamRequest_StreamConnect ¶ added in v0.0.21
type StreamRequest_StreamConnect struct {
StreamConnect *StreamConnect `protobuf:"bytes,1,opt,name=stream_connect,json=streamConnect,proto3,oneof"`
}
type StreamRequest_StreamMessage ¶ added in v0.0.21
type StreamRequest_StreamMessage struct {
StreamMessage *StreamMessage `protobuf:"bytes,2,opt,name=stream_message,json=streamMessage,proto3,oneof"`
}
type StreamResponse ¶ added in v0.0.21
type StreamResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*StreamResponse) Descriptor
deprecated
added in
v0.0.21
func (*StreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.
func (*StreamResponse) GetData ¶ added in v0.0.21
func (x *StreamResponse) GetData() []byte
func (*StreamResponse) GetValue ¶ added in v0.0.21
func (x *StreamResponse) GetValue() uint64
func (*StreamResponse) ProtoMessage ¶ added in v0.0.21
func (*StreamResponse) ProtoMessage()
func (*StreamResponse) ProtoReflect ¶ added in v0.0.21
func (x *StreamResponse) ProtoReflect() protoreflect.Message
func (*StreamResponse) Reset ¶ added in v0.0.21
func (x *StreamResponse) Reset()
func (*StreamResponse) String ¶ added in v0.0.21
func (x *StreamResponse) String() string
type UnimplementedInternalServer ¶ added in v0.0.9
type UnimplementedInternalServer struct{}
UnimplementedInternalServer 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 (UnimplementedInternalServer) Add ¶ added in v0.0.10
func (UnimplementedInternalServer) Add(context.Context, *AddRequest) (*AddResponse, error)
func (UnimplementedInternalServer) Apply ¶ added in v0.0.9
func (UnimplementedInternalServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
func (UnimplementedInternalServer) Commit ¶ added in v0.0.9
func (UnimplementedInternalServer) Commit(context.Context, *CommitRequest) (*CommitResponse, error)
func (UnimplementedInternalServer) Index ¶ added in v0.0.10
func (UnimplementedInternalServer) Index(context.Context, *IndexRequest) (*IndexResponse, error)
func (UnimplementedInternalServer) Info ¶ added in v0.0.9
func (UnimplementedInternalServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
func (UnimplementedInternalServer) Join ¶ added in v0.0.9
func (UnimplementedInternalServer) Join(context.Context, *JoinRequest) (*JoinResponse, error)
func (UnimplementedInternalServer) Members ¶ added in v0.0.9
func (UnimplementedInternalServer) Members(context.Context, *MembersRequest) (*MembersResponse, error)
func (UnimplementedInternalServer) Ping ¶ added in v0.0.9
func (UnimplementedInternalServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedInternalServer) Probe ¶ added in v0.0.9
func (UnimplementedInternalServer) Probe(context.Context, *ProbeRequest) (*ProbeResponse, error)
func (UnimplementedInternalServer) Read ¶ added in v0.0.9
func (UnimplementedInternalServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
func (UnimplementedInternalServer) Stream ¶ added in v0.0.21
func (UnimplementedInternalServer) Stream(grpc.BidiStreamingServer[StreamRequest, StreamResponse]) error
func (UnimplementedInternalServer) Watch ¶ added in v0.0.9
func (UnimplementedInternalServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
type UnsafeInternalServer ¶ added in v0.0.9
type UnsafeInternalServer interface {
// contains filtered or unexported methods
}
UnsafeInternalServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InternalServer will result in compilation errors.
type WatchRequest ¶ added in v0.0.9
type WatchRequest struct {
ShardId uint64 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
Stale bool `protobuf:"varint,2,opt,name=stale,proto3" json:"stale,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WatchRequest) Descriptor
deprecated
added in
v0.0.9
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetData ¶ added in v0.0.9
func (x *WatchRequest) GetData() []byte
func (*WatchRequest) GetShardId ¶ added in v0.0.9
func (x *WatchRequest) GetShardId() uint64
func (*WatchRequest) GetStale ¶ added in v0.0.9
func (x *WatchRequest) GetStale() bool
func (*WatchRequest) ProtoMessage ¶ added in v0.0.9
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶ added in v0.0.9
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶ added in v0.0.9
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶ added in v0.0.9
func (x *WatchRequest) String() string
type WatchResponse ¶ added in v0.0.9
type WatchResponse struct {
Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*WatchResponse) Descriptor
deprecated
added in
v0.0.9
func (*WatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.
func (*WatchResponse) GetData ¶ added in v0.0.9
func (x *WatchResponse) GetData() []byte
func (*WatchResponse) GetValue ¶ added in v0.0.9
func (x *WatchResponse) GetValue() uint64
func (*WatchResponse) ProtoMessage ¶ added in v0.0.9
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) ProtoReflect ¶ added in v0.0.9
func (x *WatchResponse) ProtoReflect() protoreflect.Message
func (*WatchResponse) Reset ¶ added in v0.0.9
func (x *WatchResponse) Reset()
func (*WatchResponse) String ¶ added in v0.0.9
func (x *WatchResponse) String() string