This commit is contained in:
crusader 2018-07-01 13:27:02 +09:00
parent 19dfca7aa5
commit 00e635a7b9
3 changed files with 15 additions and 21 deletions

22
Gopkg.lock generated
View File

@ -33,19 +33,19 @@
"protocol", "protocol",
"registry" "registry"
] ]
revision = "dcc3af07239b3f6fcbae3529bcb52c522b02053d" revision = "b834f36e2bdb7e5ff93e83ab165ee0310895f6e7"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "git.loafle.net/commons/server-go" name = "git.loafle.net/commons/server-go"
packages = [ packages = [
".", ".",
"client",
"socket", "socket",
"socket/client",
"socket/web", "socket/web",
"socket/web/client" "socket/web/client"
] ]
revision = "1cae23cf7819d56fd399346a1dc30af6a82d1a93" revision = "20a63b3de6efdc0942bfb4be21ddc64e2b76f59d"
[[projects]] [[projects]]
branch = "master" branch = "master"
@ -77,13 +77,13 @@
"model/sensorconfig", "model/sensorconfig",
"service/probe" "service/probe"
] ]
revision = "846c510a1ae54597ef1b1589613dfca7a3f7a3ed" revision = "7e2ff26648aefbafaee2ca28c1a958332ae4c6f9"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "git.loafle.net/overflow/crawler-go" name = "git.loafle.net/overflow/crawler-go"
packages = ["."] packages = ["."]
revision = "377582c76e19dcd275b6746ac519340c4625d32b" revision = "bae05dbc820773ec5b584cb39614216dd408a7f7"
[[projects]] [[projects]]
name = "github.com/BurntSushi/toml" name = "github.com/BurntSushi/toml"
@ -104,8 +104,8 @@
"gzip", "gzip",
"zlib" "zlib"
] ]
revision = "6c8db69c4b49dd4df1fff66996cf556176d0b9bf" revision = "5fb1f31b0a61e9858f12f39266e059848a5f1cea"
version = "v1.2.1" version = "v1.3.0"
[[projects]] [[projects]]
name = "github.com/klauspost/cpuid" name = "github.com/klauspost/cpuid"
@ -113,12 +113,6 @@
revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da" revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da"
version = "v1.1" version = "v1.1"
[[projects]]
name = "github.com/klauspost/crc32"
packages = ["."]
revision = "cb6bfca970f6908083f26f39a79009d608efd5cd"
version = "v1.1"
[[projects]] [[projects]]
name = "github.com/valyala/fasthttp" name = "github.com/valyala/fasthttp"
packages = [ packages = [
@ -162,6 +156,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "f9266b6f34087d53fc1063425f97d8ac2e4318b42ea6e044773aad9e65c42b1e" inputs-digest = "cb81ec9eec96b324c50549946ad21270e3196894729af8f88a8b2e6150661aad"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@ -7,7 +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" cssc "git.loafle.net/commons/server-go/socket/client"
occi "git.loafle.net/overflow/commons-go/core/interfaces" occi "git.loafle.net/overflow/commons-go/core/interfaces"
) )
@ -24,7 +24,7 @@ type ClientHandlers struct {
validated atomic.Value validated atomic.Value
} }
func (ch *ClientHandlers) Init(clientCtx csc.ClientCtx) error { func (ch *ClientHandlers) Init(clientCtx cssc.ClientCtx) error {
if err := ch.ClientHandlers.Init(clientCtx); nil != err { if err := ch.ClientHandlers.Init(clientCtx); nil != err {
return err return err
} }
@ -36,7 +36,7 @@ func (ch *ClientHandlers) Init(clientCtx csc.ClientCtx) error {
return nil return nil
} }
func (ch *ClientHandlers) OnStart(clientCtx csc.ClientCtx) error { func (ch *ClientHandlers) OnStart(clientCtx cssc.ClientCtx) error {
if err := ch.ClientHandlers.OnStart(clientCtx); nil != err { if err := ch.ClientHandlers.OnStart(clientCtx); nil != err {
return err return err
} }
@ -48,7 +48,7 @@ func (ch *ClientHandlers) OnStart(clientCtx csc.ClientCtx) error {
return nil return nil
} }
func (ch *ClientHandlers) OnStop(clientCtx csc.ClientCtx) { func (ch *ClientHandlers) OnStop(clientCtx cssc.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)
} }
@ -56,7 +56,7 @@ func (ch *ClientHandlers) OnStop(clientCtx csc.ClientCtx) {
ch.ClientHandlers.OnStop(clientCtx) ch.ClientHandlers.OnStop(clientCtx)
} }
func (ch *ClientHandlers) Destroy(clientCtx csc.ClientCtx) { func (ch *ClientHandlers) Destroy(clientCtx cssc.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)
} }

View File

@ -7,7 +7,7 @@ import (
"path" "path"
"git.loafle.net/commons/logging-go" "git.loafle.net/commons/logging-go"
csc "git.loafle.net/commons/server-go/client" cssc "git.loafle.net/commons/server-go/socket/client"
csswc "git.loafle.net/commons/server-go/socket/web/client" csswc "git.loafle.net/commons/server-go/socket/web/client"
occc "git.loafle.net/overflow/commons-go/config/container" occc "git.loafle.net/overflow/commons-go/config/container"
occp "git.loafle.net/overflow/commons-go/config/probe" occp "git.loafle.net/overflow/commons-go/config/probe"
@ -42,7 +42,7 @@ func NewConnector(containerType occp.ContainerType, portNumber int) (*csswc.Conn
} }
connector.ResponseHandler = func(res *http.Response) { connector.ResponseHandler = func(res *http.Response) {
} }
connector.OnDisconnected = func(connector csc.Connector) { connector.OnDisconnected = func(connector cssc.Connector) {
logging.Logger().Debugf("Client[%s] has been disconnected", connector.GetName()) logging.Logger().Debugf("Client[%s] has been disconnected", connector.GetName())
} }