채널이름을 모든 public 함수의 signature를 고려
This commit is contained in:
11
rpc/rpc.go
11
rpc/rpc.go
@ -58,9 +58,18 @@ func Start(ctx context.Context, redisClient *redis.Client) {
|
||||
}
|
||||
|
||||
hash := md5.New()
|
||||
for k := range engine.receivers {
|
||||
for k, manifest := range engine.receivers {
|
||||
hash.Write([]byte(k))
|
||||
for m, r := range manifest.methods {
|
||||
hash.Write([]byte(m))
|
||||
hash.Write([]byte(r.Name))
|
||||
for i := 0; i < r.Type.NumIn(); i++ {
|
||||
inName := r.Type.In(i).Name()
|
||||
hash.Write([]byte(inName))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pubsubName := hex.EncodeToString(hash.Sum(nil))[:16]
|
||||
|
||||
engine.publish = func(s []byte) error {
|
||||
|
||||
Reference in New Issue
Block a user