Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
f1486cb0
Commit
f1486cb0
authored
May 03, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dfe103d8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
go/neo/master.go
go/neo/master.go
+11
-1
go/neo/storage.go
go/neo/storage.go
+13
-0
No files found.
go/neo/master.go
View file @
f1486cb0
...
...
@@ -30,10 +30,12 @@ import (
// Master is a node overseeing and managing how whole NEO cluster works
type
Master
struct
{
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"
...
...
go/neo/storage.go
View file @
f1486cb0
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment