node_server

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: 5 Imported by: 0

README

node_server

This package implements the gRPC server interface i.e. it contains the functions defined in the proto file. It calls the necessary functions required to execute the incoming requests.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Node *node.RavelNode
}

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

Run executes the operation specified in "req", it can be {get, set, delete, getAndDelete}

Jump to

Keyboard shortcuts

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