RavelNodePB

package
v0.0.0-...-73ed01f Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 8 Imported by: 0

README

RavelNodePB

The RavelNodePB package is the auto generated package for the gRPC server using protoc for the ravel_node proto file

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Boolean.ProtoReflect.Descriptor instead.

func (*Boolean) GetLeader

func (x *Boolean) GetLeader() bool

func (*Boolean) ProtoMessage

func (*Boolean) ProtoMessage()

func (*Boolean) ProtoReflect

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

func (*Boolean) Reset

func (x *Boolean) Reset()

func (*Boolean) String

func (x *Boolean) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetKey

func (x *Command) GetKey() []byte

func (*Command) GetOperation

func (x *Command) GetOperation() string

func (*Command) GetValue

func (x *Command) GetValue() []byte

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetClusterId

func (x *Node) GetClusterId() string

func (*Node) GetGrpcAddress

func (x *Node) GetGrpcAddress() string

func (*Node) GetNodeId

func (x *Node) GetNodeId() string

func (*Node) GetRaftAddress

func (x *Node) GetRaftAddress() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() []byte

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedRavelNodeServer

type UnimplementedRavelNodeServer struct {
}

UnimplementedRavelNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedRavelNodeServer) IsLeader

func (*UnimplementedRavelNodeServer) Join

func (*UnimplementedRavelNodeServer) Leave

func (*UnimplementedRavelNodeServer) Run

type Void

type Void struct {
	// contains filtered or unexported fields
}

func (*Void) Descriptor deprecated

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

Deprecated: Use Void.ProtoReflect.Descriptor instead.

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) ProtoReflect

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

func (*Void) Reset

func (x *Void) Reset()

func (*Void) String

func (x *Void) String() string

Jump to

Keyboard shortcuts

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