Documentation ¶
Index ¶
- Variables
- func RegisterRavelNodeServer(s *grpc.Server, srv RavelNodeServer)
- type Boolean
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetKey() []byte
- func (x *Command) GetOperation() string
- func (x *Command) GetValue() []byte
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetClusterId() string
- func (x *Node) GetGrpcAddress() string
- func (x *Node) GetNodeId() string
- func (x *Node) GetRaftAddress() string
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- type RavelNodeClient
- type RavelNodeServer
- type Response
- type UnimplementedRavelNodeServer
- func (*UnimplementedRavelNodeServer) IsLeader(context.Context, *Void) (*Boolean, error)
- func (*UnimplementedRavelNodeServer) Join(context.Context, *Node) (*Void, error)
- func (*UnimplementedRavelNodeServer) Leave(context.Context, *Node) (*Void, error)
- func (*UnimplementedRavelNodeServer) Run(context.Context, *Command) (*Response, error)
- type Void
Constants ¶
This section is empty.
Variables ¶
View Source
var File_ravel_cmd_ravel_node_ravel_node_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRavelNodeServer ¶
func RegisterRavelNodeServer(s *grpc.Server, srv RavelNodeServer)
Types ¶
type Boolean ¶
type Boolean struct { Leader bool `protobuf:"varint,1,opt,name=leader,proto3" json:"leader,omitempty"` // contains filtered or unexported fields }
func (*Boolean) Descriptor
deprecated
func (*Boolean) ProtoMessage ¶
func (*Boolean) ProtoMessage()
func (*Boolean) ProtoReflect ¶
func (x *Boolean) ProtoReflect() protoreflect.Message
type Command ¶
type Command struct { Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Command) Descriptor
deprecated
func (*Command) GetOperation ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Node ¶
type Node struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` GrpcAddress string `protobuf:"bytes,2,opt,name=grpc_address,json=grpcAddress,proto3" json:"grpc_address,omitempty"` RaftAddress string `protobuf:"bytes,3,opt,name=raft_address,json=raftAddress,proto3" json:"raft_address,omitempty"` ClusterId string `protobuf:"bytes,4,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) GetClusterId ¶
func (*Node) GetGrpcAddress ¶
func (*Node) GetRaftAddress ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type RavelNodeClient ¶
type RavelNodeClient interface { Join(ctx context.Context, in *Node, opts ...grpc.CallOption) (*Void, error) Leave(ctx context.Context, in *Node, opts ...grpc.CallOption) (*Void, error) Run(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Response, error) IsLeader(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Boolean, error) }
RavelNodeClient is the client API for RavelNode service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRavelNodeClient ¶
func NewRavelNodeClient(cc grpc.ClientConnInterface) RavelNodeClient
type RavelNodeServer ¶
type RavelNodeServer interface { Join(context.Context, *Node) (*Void, error) Leave(context.Context, *Node) (*Void, error) Run(context.Context, *Command) (*Response, error) IsLeader(context.Context, *Void) (*Boolean, error) }
RavelNodeServer is the server API for RavelNode service.
type Response ¶
type Response struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedRavelNodeServer ¶
type UnimplementedRavelNodeServer struct { }
UnimplementedRavelNodeServer can be embedded to have forward compatible implementations.
type Void ¶
type Void struct {
// contains filtered or unexported fields
}
func (*Void) Descriptor
deprecated
func (*Void) ProtoMessage ¶
func (*Void) ProtoMessage()
func (*Void) ProtoReflect ¶
func (x *Void) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.