From d789910a8b813f6b81080c88116ff1c8cdf3bf63 Mon Sep 17 00:00:00 2001 From: "jw_wonny.cha" Date: Mon, 25 Mar 2019 16:59:53 +0900 Subject: [PATCH] Add "Const" prefix in configure --- src/servicemgr/configure.go | 53 +++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/src/servicemgr/configure.go b/src/servicemgr/configure.go index 986155d..df72941 100644 --- a/src/servicemgr/configure.go +++ b/src/servicemgr/configure.go @@ -1,27 +1,52 @@ package servicemgr +import "errors" + const ( // IPCMsgChan is number of message channel for receving data IPCMsgChan = 10 - // KeyAppName is key of app name - KeyAppName = "AppName" + // ConstKeyAppName is key of app name + ConstKeyAppName = "AppName" + + // ConstKeyServiceName is key of service name + ConstKeyServiceName = "ServiceName" + + // ConstKeyCmd is key of command + ConstKeyCmd = "Cmd" + + // ConstKeyMsgChan is key of message channel + ConstKeyMsgChan = "MsgChan" + + // ConstKeyCtlChan is key of control channels + ConstKeyCtlChan = "CtlChan" - // KeyServiceName is key of service name - KeyServiceName = "ServiceName" + // ConstServiceStatusFailed is service status is failed + ConstServiceStatusFailed = "Failed" - // KeyCmd is key of command - KeyCmd = "Cmd" + // ConstServiceStatusStarted is service status is started + ConstServiceStatusStarted = "Started" - // KeyMsgChan is key of message channel - KeyMsgChan = "MsgChan" + // ConstServiceStatusFinished is service status is finished + ConstServiceStatusFinished = "Finished" - // KeyCtlChan is key of control channels - KeyCtlChan = "CtlChan" + // ConstServiceFound is service status is found + ConstServiceFound = "Found" + + // ConstServiceNotFound is service status is not found + ConstServiceNotFound = "NotFound" + + // ConstFWWellknownPort is wellknonw port of framework + ConstFWWellknownPort = 56002 ) -// ServiceMap is that map has service information -var ServiceMap ConcurrentMap +var ( + // ErrInvalidService is for error type of invalid service + ErrInvalidService = errors.New("It is Invalid Service") -// ServiceIdx is for unique service ID -var ServiceIdx uint64 + // ServiceMap is that map has service information + ServiceMap ConcurrentMap + + // ServiceIdx is for unique service ID + ServiceIdx uint64 +) -- 2.34.1