Documentation ¶
Index ¶
- func CallClient(c context.Context, clientID string, event pb.Event, msg proto.Message) (*pb.ClientMessage, error)
- func CallClientWrapper[R common.RespType](c context.Context, clientID string, event pb.Event, req proto.Message, resp *R) error
- func GetClientCert(clientID, clientSecret string, clientType pb.ClientType) []byte
- func InitRPCClients()
- func MasterCli(c context.Context) (pb.MasterClient, error)
- func MustInitClientsManager()
- func Recv(clientID string) chan bool
- type ClientsManager
- type ClientsManagerImpl
- func (c *ClientsManagerImpl) ClientAddr(cliID string) string
- func (c *ClientsManagerImpl) ConnectTime(cliID string) (time.Time, bool)
- func (c *ClientsManagerImpl) Get(cliID string) *Connector
- func (c *ClientsManagerImpl) Remove(cliID string)
- func (c *ClientsManagerImpl) Set(cliID, clientType string, sender pb.Master_ServerSendServer)
- type Connector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallClient ¶
func CallClientWrapper ¶ added in v0.1.0
func GetClientCert ¶
func GetClientCert(clientID, clientSecret string, clientType pb.ClientType) []byte
func InitRPCClients ¶
func InitRPCClients()
func MustInitClientsManager ¶
func MustInitClientsManager()
Types ¶
type ClientsManager ¶
type ClientsManager interface { Get(cliID string) *Connector Set(cliID, clientType string, sender pb.Master_ServerSendServer) Remove(cliID string) ClientAddr(cliID string) string ConnectTime(cliID string) (time.Time, bool) }
func GetClientsManager ¶
func GetClientsManager() ClientsManager
type ClientsManagerImpl ¶
type ClientsManagerImpl struct {
// contains filtered or unexported fields
}
func NewClientsManager ¶
func NewClientsManager() *ClientsManagerImpl
func (*ClientsManagerImpl) ClientAddr ¶ added in v0.0.32
func (c *ClientsManagerImpl) ClientAddr(cliID string) string
func (*ClientsManagerImpl) ConnectTime ¶ added in v0.0.32
func (c *ClientsManagerImpl) ConnectTime(cliID string) (time.Time, bool)
func (*ClientsManagerImpl) Get ¶
func (c *ClientsManagerImpl) Get(cliID string) *Connector
Get implements ClientsManager.
func (*ClientsManagerImpl) Remove ¶
func (c *ClientsManagerImpl) Remove(cliID string)
func (*ClientsManagerImpl) Set ¶
func (c *ClientsManagerImpl) Set(cliID, clientType string, sender pb.Master_ServerSendServer)
Set implements ClientsManager.
Click to show internal directories.
Click to hide internal directories.