implemented some more control channel handler in server.go
This commit is contained in:
4
hodu.go
4
hodu.go
@ -17,11 +17,11 @@ const (
|
||||
)
|
||||
|
||||
type Logger interface {
|
||||
Write (id string, level LogLevel, fmtstr string, args ...interface{})
|
||||
Write(id string, level LogLevel, fmtstr string, args ...interface{})
|
||||
}
|
||||
|
||||
type Service interface {
|
||||
RunTask (wg *sync.WaitGroup) // blocking. run the actual task loop. it must call wg.Done() upon exit from itself.
|
||||
RunTask(wg *sync.WaitGroup) // blocking. run the actual task loop. it must call wg.Done() upon exit from itself.
|
||||
StartService(data interface{}) // non-blocking. spin up a service. it may be invokded multiple times for multiple instances
|
||||
StopServices() // non-blocking. send stop request to all services spun up
|
||||
WaitForTermination() // blocking. must wait until all services are stopped
|
||||
|
Reference in New Issue
Block a user