communication

package
v0.0.0-...-46d7ffa Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeBody

func DeserializeBody(body string, toObject interface{}) error

func SerialiazeBody

func SerialiazeBody(body interface{}) (string, error)

Types

type CommunicationManager

type CommunicationManager struct {
	ReceiverChannel <-chan tcp.MessageFromCluster
	// contains filtered or unexported fields
}

func StartCommManager

func StartCommManager(nodeId string, nodeIp string, nodePort string) *CommunicationManager

func (*CommunicationManager) GetPartitionTableRequest

func (c *CommunicationManager) GetPartitionTableRequest(toNodeId string) (*partitioner.PartitionTable, error)

func (*CommunicationManager) SendAbortPartitionTableChangesToRequestor

func (c *CommunicationManager) SendAbortPartitionTableChangesToRequestor(toNodeId string, message string) error

sent to a node trying to join or leave (decommision) the cluster in case the op cannot be completed

func (*CommunicationManager) SendActionsLog

func (c *CommunicationManager) SendActionsLog(toNodeId string, data []storage.Entry) error

func (*CommunicationManager) SendClusterStatusRequest

func (c *CommunicationManager) SendClusterStatusRequest(toNodeId string) ([]server.Server, error)

func (*CommunicationManager) SendCommitPartitionTableRequest

func (c *CommunicationManager) SendCommitPartitionTableRequest(toNodeId string) error

func (*CommunicationManager) SendDataStreamChunk

func (c *CommunicationManager) SendDataStreamChunk(toNodeId string, data stream.StreamMessage) error

func (*CommunicationManager) SendDataStreamTaskCompleted

func (c *CommunicationManager) SendDataStreamTaskCompleted(toNodeId string, taskId string) error

func (*CommunicationManager) SendDecommissionNodeRequest

func (c *CommunicationManager) SendDecommissionNodeRequest(toNodeId string, nodeId string) error

request to toNodeId decomission of a specific node (nodeId)

func (*CommunicationManager) SendDel

func (c *CommunicationManager) SendDel(toNodeId string, collectionName string, key []byte) error

func (*CommunicationManager) SendForceReleaseMasterRequest

func (c *CommunicationManager) SendForceReleaseMasterRequest(toNodeId string) error

func (*CommunicationManager) SendGet

func (c *CommunicationManager) SendGet(toNodeId string, collectionName string, key []byte) ([]byte, error)

func (*CommunicationManager) SendGetKeyLocation

func (c *CommunicationManager) SendGetKeyLocation(toNodeId string, key []byte) (partitioner.HashLocation, error)

func (*CommunicationManager) SendGetNodeStatsRequest

func (c *CommunicationManager) SendGetNodeStatsRequest(toNodeId string) (types.NodeStatsResponse, error)

func (*CommunicationManager) SendGetSyncTasks

func (c *CommunicationManager) SendGetSyncTasks(toNodeId string) (types.DataSyncStatusResponse, error)

func (*CommunicationManager) SendJoinClusterRequest

func (c *CommunicationManager) SendJoinClusterRequest(toNodeId string, nodeId string, nodeIp string, nodePort string, numbOfVNodes int) error

func (*CommunicationManager) SendNodeBackOnlineNotification

func (c *CommunicationManager) SendNodeBackOnlineNotification(toNodeId string) (int64, error)

func (*CommunicationManager) SendPing

func (c *CommunicationManager) SendPing(toNodeId string) (string, error)

func (*CommunicationManager) SendReleaseMasterRequest

func (c *CommunicationManager) SendReleaseMasterRequest(toNodeId string) error

func (*CommunicationManager) SendRequestToBecomeMaster

func (c *CommunicationManager) SendRequestToBecomeMaster(toNodeId string) (bool, int64, error)

func (*CommunicationManager) SendRetrySyncTask

func (c *CommunicationManager) SendRetrySyncTask(toNodeId string, taskId string) error

func (*CommunicationManager) SendScan

func (c *CommunicationManager) SendScan(toNodeId string, collectionName string, startFromKey []byte, numberOfResults int) ([]types.RWRequest, error)

func (*CommunicationManager) SendSet

func (c *CommunicationManager) SendSet(toNodeId string, collectionName string, key []byte, value []byte) error

func (*CommunicationManager) SendStartDataStreamRequest

func (c *CommunicationManager) SendStartDataStreamRequest(taskId string, toNodeId string, from uint64, to uint64) error

func (*CommunicationManager) SendUpdatePartitionTableRequest

func (c *CommunicationManager) SendUpdatePartitionTableRequest(toNodeId string, partitionTable *partitioner.PartitionTable) error

func (*CommunicationManager) Shutdown

func (c *CommunicationManager) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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