network: extend Service with Name, use it to distinguish services

This commit is contained in:
Roman Khimov 2022-04-22 11:33:56 +03:00
parent a10b1ad32d
commit 2593bb0535
8 changed files with 41 additions and 10 deletions

View file

@ -174,6 +174,11 @@ func NewOracle(cfg Config) (*Oracle, error) {
return o, nil
}
// Name returns service name.
func (o *Oracle) Name() string {
return "oracle"
}
// Shutdown shutdowns Oracle.
func (o *Oracle) Shutdown() {
close(o.close)