ing
This commit is contained in:
parent
9dfd718c36
commit
d47b7bfd75
|
@ -7,6 +7,7 @@ import (
|
||||||
|
|
||||||
logging "git.loafle.net/commons/logging-go"
|
logging "git.loafle.net/commons/logging-go"
|
||||||
crc "git.loafle.net/commons/rpc-go/client"
|
crc "git.loafle.net/commons/rpc-go/client"
|
||||||
|
csc "git.loafle.net/commons/server-go/client"
|
||||||
occi "git.loafle.net/overflow/commons-go/core/interfaces"
|
occi "git.loafle.net/overflow/commons-go/core/interfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ type ClientHandlers struct {
|
||||||
validated atomic.Value
|
validated atomic.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *ClientHandlers) Init(clientCtx crc.ClientCtx) error {
|
func (ch *ClientHandlers) Init(clientCtx csc.ClientCtx) error {
|
||||||
if err := ch.ClientHandlers.Init(clientCtx); nil != err {
|
if err := ch.ClientHandlers.Init(clientCtx); nil != err {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -35,7 +36,7 @@ func (ch *ClientHandlers) Init(clientCtx crc.ClientCtx) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *ClientHandlers) OnStart(clientCtx crc.ClientCtx) error {
|
func (ch *ClientHandlers) OnStart(clientCtx csc.ClientCtx) error {
|
||||||
if err := ch.ClientHandlers.OnStart(clientCtx); nil != err {
|
if err := ch.ClientHandlers.OnStart(clientCtx); nil != err {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -47,7 +48,7 @@ func (ch *ClientHandlers) OnStart(clientCtx crc.ClientCtx) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *ClientHandlers) OnStop(clientCtx crc.ClientCtx) {
|
func (ch *ClientHandlers) OnStop(clientCtx csc.ClientCtx) {
|
||||||
if err := occi.ExecServices(ch.Services, occi.ServiceMethodStop, ch.OrderedServices, true); nil != err {
|
if err := occi.ExecServices(ch.Services, occi.ServiceMethodStop, ch.OrderedServices, true); nil != err {
|
||||||
logging.Logger().Errorf("Container[%s]: Service stop err %v", ch.Name, err)
|
logging.Logger().Errorf("Container[%s]: Service stop err %v", ch.Name, err)
|
||||||
}
|
}
|
||||||
|
@ -55,7 +56,7 @@ func (ch *ClientHandlers) OnStop(clientCtx crc.ClientCtx) {
|
||||||
ch.ClientHandlers.OnStop(clientCtx)
|
ch.ClientHandlers.OnStop(clientCtx)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *ClientHandlers) Destroy(clientCtx crc.ClientCtx) {
|
func (ch *ClientHandlers) Destroy(clientCtx csc.ClientCtx) {
|
||||||
if err := occi.ExecServices(ch.Services, occi.ServiceMethodDestroy, ch.OrderedServices, true); nil != err {
|
if err := occi.ExecServices(ch.Services, occi.ServiceMethodDestroy, ch.OrderedServices, true); nil != err {
|
||||||
logging.Logger().Errorf("Container[%s]: Service destroy err %v", ch.Name, err)
|
logging.Logger().Errorf("Container[%s]: Service destroy err %v", ch.Name, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user