mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +00:00
bb95a087d4
Former-commit-id: 8c311050eb7fe3935642fd94eb08e0f1622ff811 [formerly e5fdf2de13229bdbd174cff41bba9cdc64c4424f] Former-commit-id: bb4cf8b1c2b8858ea9ddb96242473486b165adfc
17 lines
607 B
Go
17 lines
607 B
Go
package sharding
|
|
|
|
// Service defines items that can be registered into a sharding client.
|
|
//
|
|
// life-cycle management is delegated to the sharding client. The service is allowed to
|
|
// initialize itself upon creation, but no goroutines should be spun up outside of the
|
|
// Start method.
|
|
type Service interface {
|
|
// Start is called after all services have been constructed and the networking
|
|
// layer was also initialized to spawn any goroutines required by the service.
|
|
Start() error
|
|
|
|
// Stop terminates all goroutines belonging to the service, blocking until they
|
|
// are all terminated.
|
|
Stop() error
|
|
}
|