feat config
This commit is contained in:
@@ -20,7 +20,7 @@ func init() {
|
||||
sceneServerM = make(map[int64]map[SceneFun]grpc.ClientStream)
|
||||
}
|
||||
|
||||
func FindSceneBySID(sid int64, fun SceneFun) (grpc.ClientStream, error) {
|
||||
func findSceneBySID(sid int64, fun SceneFun) (grpc.ClientStream, error) {
|
||||
g := sceneServerM[sid]
|
||||
if g == nil {
|
||||
g = make(map[SceneFun]grpc.ClientStream)
|
||||
@@ -39,7 +39,7 @@ func FindSceneBySID(sid int64, fun SceneFun) (grpc.ClientStream, error) {
|
||||
link, err = sceneClient.Action(context.Background())
|
||||
}
|
||||
if err != nil {
|
||||
log.Errorf("FindSceneBySID %v err: %v, sid: %v", fun, err, sid)
|
||||
log.Errorf("findSceneBySID %v err: %v, sid: %v", fun, err, sid)
|
||||
return nil, err
|
||||
}
|
||||
g[fun] = link
|
||||
@@ -49,7 +49,7 @@ func FindSceneBySID(sid int64, fun SceneFun) (grpc.ClientStream, error) {
|
||||
}
|
||||
|
||||
func SendMessageToScene(sid int64, fun SceneFun, msg proto.Message, re ...bool) error {
|
||||
stream, err := FindSceneBySID(sid, fun)
|
||||
stream, err := findSceneBySID(sid, fun)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user