processor

package
v0.0.0-...-82caf8f Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckerPeriod  = 5 // 5 secs
	ErrorThreshold = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

func NewChecker

func NewChecker(topology *cluster.ClusterTopology, outcomingQueue *OutCommandQueue, partitioner *Partitioner) *Checker

func (*Checker) Do

func (ckr *Checker) Do()

func (*Checker) Stop

func (ckr *Checker) Stop()

type InCommandQueue

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

func NewCommandQueue

func NewCommandQueue(ks storage.OvoStorage) *InCommandQueue

func (*InCommandQueue) Enqueu

func (cq *InCommandQueue) Enqueu(cmd *command.Command)

func (*InCommandQueue) KeyStore

func (cq *InCommandQueue) KeyStore() storage.OvoStorage

type NodeCaller

type NodeCaller struct {
	Source string
	Name   string
	// contains filtered or unexported fields
}

func NewNodeCaller

func NewNodeCaller(source string) *NodeCaller

Create the node caller

func (*NodeCaller) ExecuteOperation

func (nc *NodeCaller) ExecuteOperation(obj *storage.MetaDataUpdObj, destination *cluster.OvoNode, operation string) error

Execute remote operation on destination server

func (*NodeCaller) GetTopology

func (nc *NodeCaller) GetTopology(currentNode string, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to give the topology

func (*NodeCaller) Ping

func (nc *NodeCaller) Ping(currentNode string, destination *cluster.OvoNode) error

Ask the destination to give the topology

func (*NodeCaller) RegisterNode

func (nc *NodeCaller) RegisterNode(node *cluster.ClusterTopologyNode, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to register the node

func (*NodeCaller) RegisterStepbrother

func (nc *NodeCaller) RegisterStepbrother(node *cluster.ClusterTopologyNode, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to register the node as a stepbrother

func (*NodeCaller) RegisterTwin

func (nc *NodeCaller) RegisterTwin(node *cluster.ClusterTopologyNode, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to register the node as a twin

func (*NodeCaller) RegisterTwinAndStepbrother

func (nc *NodeCaller) RegisterTwinAndStepbrother(node *cluster.ClusterTopologyNode, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to register the node as a twin and a stepbrother

func (*NodeCaller) RemoveClient

func (nc *NodeCaller) RemoveClient(name string)

Remove a client by name

func (*NodeCaller) UpdateNode

func (nc *NodeCaller) UpdateNode(node *cluster.ClusterTopologyNode, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to update the node

func (*NodeCaller) UpdateTopology

func (nc *NodeCaller) UpdateTopology(topology *cluster.ClusterTopology, destination *cluster.OvoNode) (*cluster.ClusterTopology, error)

Ask the destination to update the topology

type OutCommandQueue

type OutCommandQueue struct {
	Caller *NodeCaller
	// contains filtered or unexported fields
}

func NewOutCommandQueue

func NewOutCommandQueue(serverNode *cluster.ClusterTopologyNode, topology *cluster.ClusterTopology, incomingQueue *InCommandQueue) *OutCommandQueue

Create the outcoming command processor queue

func (*OutCommandQueue) Enqueu

func (cq *OutCommandQueue) Enqueu(cmd *command.Command)

type Partitioner

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

func NewPartitioner

func NewPartitioner(storage storage.OvoStorage, serverNode *cluster.ClusterTopologyNode, outcomingQueue *OutCommandQueue) *Partitioner

func (*Partitioner) MoveData

func (p *Partitioner) MoveData()

func (*Partitioner) MoveObject

func (p *Partitioner) MoveObject(obj *storage.MetaDataObj)

Jump to

Keyboard shortcuts

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