prysm-pulse/sharding/service.go
Raul Jordan bb95a087d4 sharding: rename client package to node
Former-commit-id: 8c311050eb7fe3935642fd94eb08e0f1622ff811 [formerly e5fdf2de13229bdbd174cff41bba9cdc64c4424f]
Former-commit-id: bb4cf8b1c2b8858ea9ddb96242473486b165adfc
2018-05-22 06:16:57 -05:00

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
}