Skip to content

Commit

Permalink
Add Name method
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Dec 20, 2020
1 parent 1f5385d commit 888d8b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Service interface {

Env() options.Environment
Config() config.Config
Name() string

Server() server.Server
Client() client.Client
Expand Down Expand Up @@ -96,6 +97,10 @@ func (s *service) Config() config.Config {
return s.options.Config
}

func (s *service) Name() string {
return s.options.Name
}

func (s *service) Start() error {
if s.options.Name == "" {
return errors.New("missing service name")
Expand Down

0 comments on commit 888d8b7

Please sign in to comment.