Commit 999e28e6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4bedfba7
......@@ -353,6 +353,7 @@ func (node *_MasteredNode) recvδstate(ctx context.Context, msg proto.Msg) (δpt
return δpt, err
}
// updateOperational calls δf under .opMu and updates .operational from current state.
// After .opMu unlock it also notifies those who was waiting for .operational to become y.
func (node *_MasteredNode) updateOperational(δf func()) {
......@@ -388,7 +389,6 @@ func (node *_MasteredNode) updateOperational(δf func()) {
}
}
// WithOperational runs f during when cluster state is/becomes operational.
// The cluster state is guaranteed not to change during f run.
func (node *_MasteredNode) WithOperational(ctx context.Context, f func(mlink *neonet.NodeLink, cs *xneo.ClusterState) error) error {
......@@ -418,6 +418,7 @@ func (node *_MasteredNode) WithOperational(ctx context.Context, f func(mlink *ne
return f(node.mlink, &node.state)
}
var cmdShutdown = errors.New("master told us to shutdown")
// updateNodeTab applies updates to .nodeTab from message and logs changes appropriately.
......
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