server

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

Documentation

Index

Constants

View Source
const (
	CheckerPeriod  = 5 // 5 secs
	ErrorThreshold = 3
)
View Source
const (
	DefaultConfPath string = "./conf/severconf.json"
)

Variables

This section is empty.

Functions

func GetRandomName

func GetRandomName() string

func GetServerIP

func GetServerIP() string

func WriteConfiguration

func WriteConfiguration(path string, conf *ServerConf)

Types

type Checker

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

func NewChecker

func NewChecker(cnf *ServerConf, outcomingQueue *processor.OutCommandQueue, partitioner *processor.Partitioner) *Checker

func (*Checker) Do

func (ckr *Checker) Do()

func (*Checker) Stop

func (ckr *Checker) Stop()

type InnerServer

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

The innser server implementation. Listen for incoming commands.

func NewInnerServer

Creata a new inner server.

func (*InnerServer) Do

func (srv *InnerServer) Do()

Start listening commands.

func (*InnerServer) ExecuteCommand

func (srv *InnerServer) ExecuteCommand(rpccmd command.RpcCommand, reply *int) (err error)

Enqueue a remote command.

func (*InnerServer) GetTopology

func (srv *InnerServer) GetTopology(name *string, reply *cluster.ClusterTopology) (err error)

Get the topology

func (*InnerServer) Ping

func (srv *InnerServer) Ping(name *string, reply *int) (err error)

Ping

func (*InnerServer) RegisterNode

func (srv *InnerServer) RegisterNode(node *cluster.ClusterTopologyNode, reply *cluster.ClusterTopology) (err error)

Register a new node in the cluster.

func (*InnerServer) RegisterStepbrother

func (srv *InnerServer) RegisterStepbrother(node *cluster.ClusterTopologyNode, reply *cluster.ClusterTopology) (err error)

Register the new node as a stepbrother.

func (*InnerServer) RegisterTwin

func (srv *InnerServer) RegisterTwin(node *cluster.ClusterTopologyNode, reply *cluster.ClusterTopology) (err error)

Register the new node as a twin.

func (*InnerServer) RegisterTwinAndStepbrother

func (srv *InnerServer) RegisterTwinAndStepbrother(node *cluster.ClusterTopologyNode, reply *cluster.ClusterTopology) (err error)

Register the new node as a twin and a stepbrother.

func (*InnerServer) UpdateNode

func (srv *InnerServer) UpdateNode(node *cluster.ClusterTopologyNode, reply *cluster.ClusterTopology) (err error)

Update the node state without moving data.

func (*InnerServer) UpdateTopology

func (srv *InnerServer) UpdateTopology(topology *cluster.ClusterTopology, reply *cluster.ClusterTopology) (err error)

Merge the cluster topology configuration.

type Server

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

func NewServer

func NewServer(conf *ServerConf, ks storage.OvoStorage) *Server

func (*Server) Do

func (srv *Server) Do()

type ServerConf

type ServerConf struct {
	ServerNode *cluster.ClusterTopologyNode
	Topology   cluster.ClusterTopology
	Debug      bool

	HttpBindAll bool
	TcpBindAll  bool
	// contains filtered or unexported fields
}

func LoadConfiguration

func LoadConfiguration(path string) ServerConf

func (*ServerConf) Init

func (cnf *ServerConf) Init(tmpPath string)

func (*ServerConf) WriteTmp

func (cnf *ServerConf) WriteTmp()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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