*: add some comments to service Start/Shutdown methods
This commit is contained in:
parent
36d4c17a15
commit
3e2eda6752
8 changed files with 32 additions and 8 deletions
|
@ -67,8 +67,11 @@ type Service interface {
|
|||
Name() string
|
||||
// Start initializes dBFT and starts event loop for consensus service.
|
||||
// It must be called only when the sufficient amount of peers are connected.
|
||||
// The service only starts once, subsequent calls to Start are no-op.
|
||||
Start()
|
||||
// Shutdown stops dBFT event loop.
|
||||
// Shutdown stops dBFT event loop. It can only be called once, subsequent calls
|
||||
// to Shutdown on the same instance are no-op. The instance that was stopped can
|
||||
// not be started again by calling Start (use a new instance if needed).
|
||||
Shutdown()
|
||||
|
||||
// OnPayload is a callback to notify the Service about a newly received payload.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue