Documentation ¶
Index ¶
- type Server
- func (s *Server) IsLeader(ctx context.Context, v *RavelNodePB.Void) (*RavelNodePB.Boolean, error)
- func (s *Server) Join(ctx context.Context, req *RavelNodePB.Node) (*RavelNodePB.Void, error)
- func (s *Server) Leave(ctx context.Context, req *RavelNodePB.Node) (*RavelNodePB.Void, error)
- func (s *Server) Run(ctx context.Context, req *RavelNodePB.Command) (*RavelNodePB.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server implements the methods exposed via gRPC for a RavelNode
func (*Server) IsLeader ¶
func (s *Server) IsLeader(ctx context.Context, v *RavelNodePB.Void) (*RavelNodePB.Boolean, error)
IsLeader returns a boolean if this node is a leader or not
func (*Server) Join ¶
func (s *Server) Join(ctx context.Context, req *RavelNodePB.Node) (*RavelNodePB.Void, error)
Join joins the passed in node to this node
func (*Server) Leave ¶
func (s *Server) Leave(ctx context.Context, req *RavelNodePB.Node) (*RavelNodePB.Void, error)
Leave removes the passed in node from this leader
func (*Server) Run ¶
func (s *Server) Run(ctx context.Context, req *RavelNodePB.Command) (*RavelNodePB.Response, error)
Run executes the operation specified in "req", it can be {get, set, delete, getAndDelete}
Click to show internal directories.
Click to hide internal directories.