fastpastebin/internal/application/application_service.go
Stanislav N. aka pztrn 5fc6d3a181
Some checks failed
continuous-integration/drone/push Build is failing
Application superstructure (or supersingleton, if you want).
Got rid of context thing which misleads due to existance of stdlib's
context package.

Also fixed golangci-lint configuration.

Fixes #20.
2022-08-19 21:52:49 +05:00

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
}