Stanislav N. aka pztrn
5fc6d3a181
Some checks failed
continuous-integration/drone/push Build is failing
Got rid of context thing which misleads due to existance of stdlib's context package. Also fixed golangci-lint configuration. Fixes #20.
14 lines
479 B
Go
14 lines
479 B
Go
package application
|
|
|
|
// Service is a generic interface for all services of application.
|
|
type Service interface {
|
|
// GetName returns service name for registering with application superstructure.
|
|
GetName() string
|
|
// Initialize initializes service.
|
|
Initialize() error
|
|
// Shutdown shuts service down if needed. Also should block is shutdown should be done in synchronous manner.
|
|
Shutdown() error
|
|
// Start starts service if needed. Should not block execution.
|
|
Start() error
|
|
}
|