This commit is contained in:
Александр Федорюк 2022-10-27 13:43:26 +03:00
parent a6c027328b
commit 231d008885

View File

@ -98,13 +98,13 @@ func (fDesc *funcDesc) worker() {
}
type Serve struct {
NatsHost string
NatsPort string
nc *nats.Conn
projectName string
moduleName string
funcs map[string]funcDesc
timeoutCallback time.Duration
NatsHost string
NatsPort string
nc *nats.Conn
projectName string
moduleName string
funcs map[string]funcDesc
//timeoutCallback time.Duration
queueCallback string
chanQueueCallback chan *nats.Msg
subj *nats.Subscription
@ -248,7 +248,7 @@ func (serve *Serve) RegisterFunction(funcName string, f func(header *network.Hea
func (serve *Serve) RegisterFunctionWithTimeout(funcName string, timeout time.Duration, f func(header *network.Header, paylod []byte) (result []byte, err error)) (err error) {
if _, ok := serve.funcs[fmt.Sprintf("%s.%s", serve.moduleName, funcName)]; ok {
return fmt.Errorf(`Restrict duplicate function name`)
return fmt.Errorf(`restrict duplicate function name`)
}
id := make([]byte, 16)