Commit f1486cb0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dfe103d8
......@@ -29,11 +29,13 @@ import (
// Master is a node overseeing and managing how whole NEO cluster works
type Master struct {
custerName string
custerName string
clusterState ClusterState
}
func NewMaster(clusterName string) *Master {
return &Master{clusterName}
// XXX .clusterState = RECOVERING ?
}
......@@ -57,6 +59,14 @@ func (m *Master) ServeStorage(ctx context.Context, conn *Conn) {
// TODO
}
func (m *Master) ServeAdmin(ctx context.Context, conn *Conn) {
// TODO
}
func (m *Master) ServeMaster(ctx context.Context, conn *Conn) {
// TODO (for elections)
}
// ----------------------------------------
const masterSummary = "run master node"
......
......@@ -131,6 +131,19 @@ func errDecode(e *Error) error {
return e
}
func (stor *Storage) ServeMaster(ctx context.Context, conn *Conn) {
// state changes:
//
// - Recovery
// - StartOperation
// - StopOperation
// ? NotifyClusterInformation
// - NotifyNodeInformation (e.g. M tells us we are RUNNING)
// ? NotifyPartitionTable
}
// ServeClient serves incoming connection on which peer identified itself as client
// XXX +error return?
func (stor *Storage) ServeClient(ctx context.Context, conn *Conn) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment