client

package
v0.0.0-...-3e94386 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package client is a package for the grpc calls to other nodes in the cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendInquire

func SendInquire(peer string, config *Config) (*pb.InquireReply, error)

SendInquire is a grpc method for sending an inquire message to another node in the quorum(s).

func SendRelinquish

func SendRelinquish(peer string, config *Config, wg *sync.WaitGroup)

SendRelinquish is a grpc method for sending a lock release notification message to another node in the quorum(s).

func SendReply

func SendReply(reqArgs *queue.Mssg, config *Config) error

SendReply is a grpc method for sending a Reply message to another node in the quorum(s).

func SendRequest

func SendRequest(peer string, config *Config, ch chan<- *LockError, wg *sync.WaitGroup, lockReq *pb.LockReq)

SendRequest is a grpc method for sending a lock request message to another node in the quorum(s).

func SendValidate

func SendValidate(peer string, config *Config) (*pb.ValidateReply, error)

SendValidate is a grpc method for sending a Validate message to another node in the quorum(s).

Types

type Config

type Config struct {
	RPCPort    string
	RPCTimeout time.Duration
	LocalAddr  string
	TLSCRT     string
}

Config is a type for keeping the necessary configurations when making grpc calls to other nodes in the cluster.

type LockError

type LockError struct {
	Node string
	Err  error
}

LockError captures the rpc error and associated peer Node.

Jump to

Keyboard shortcuts

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