tavern 분리
This commit is contained in:
33
core/rpc/proxy.go
Normal file
33
core/rpc/proxy.go
Normal file
@ -0,0 +1,33 @@
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
func (c rpcCallContext) JoinTag(region string, tag primitive.ObjectID, tid primitive.ObjectID, hint string) error {
|
||||
return c.send("JoinTag", region, tag, tid, hint)
|
||||
}
|
||||
|
||||
func (c rpcCallContext) LeaveTag(region string, tag primitive.ObjectID, tid primitive.ObjectID, hint string) error {
|
||||
return c.send("LeaveTag", region, tag, tid, hint)
|
||||
}
|
||||
|
||||
func (c rpcCallContext) TurnGroupOnline(key string, gid primitive.ObjectID, score float64) error {
|
||||
return c.send("TurnGroupOnline", key, gid, score)
|
||||
}
|
||||
|
||||
func (c rpcCallContext) TurnGroupOffline(key string, gid primitive.ObjectID) error {
|
||||
return c.send("TurnGroupOffline", key, gid)
|
||||
}
|
||||
func (c rpcCallContext) SetStateInTag(region string, tag primitive.ObjectID, tid primitive.ObjectID, state string, hint string) error {
|
||||
return c.send("SetStateInTag", region, tag, tid, state, hint)
|
||||
}
|
||||
func (c rpcCallContext) SendMessage(doc []byte) error {
|
||||
return c.send("SendMessage", doc)
|
||||
}
|
||||
func (c rpcCallContext) SendMessageToTag(region string, gid primitive.ObjectID, msg []byte) error {
|
||||
return c.send("SendMessageToTag", region, gid, msg)
|
||||
}
|
||||
func (c rpcCallContext) CloseOnPurpose() error {
|
||||
return c.send("CloseOnPurpose")
|
||||
}
|
||||
Reference in New Issue
Block a user