diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/container.go | 1 | ||||
-rw-r--r-- | service/entry.go | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/service/container.go b/service/container.go index 1cf4a5f6..1e2e1d51 100644 --- a/service/container.go +++ b/service/container.go @@ -202,6 +202,7 @@ func (c *container) Serve() error { func (c *container) Stop() { for _, e := range c.services { if e.hasStatus(StatusServing) { + e.setStatus(StatusStopping) e.svc.(Service).Stop() e.setStatus(StatusStopped) diff --git a/service/entry.go b/service/entry.go index b8da6514..497742d1 100644 --- a/service/entry.go +++ b/service/entry.go @@ -8,16 +8,19 @@ const ( // StatusUndefined when service bus can not find the service. StatusUndefined = iota - // StatusInactive hasStatus setStatus when service has been registered in container. + // StatusInactive when service has been registered in container. StatusInactive - // StatusOK hasStatus setStatus when service has been properly configured. + // StatusOK when service has been properly configured. StatusOK - // StatusServing hasStatus setStatus when service hasStatus currently done. + // StatusServing when service is currently done. StatusServing - // StatusStopped hasStatus setStatus when service hasStatus stopped. + // StatusStopping when service is currently stopping. + StatusStopping + + // StatusStopped when service being stopped. StatusStopped ) |