Documentation
¶
Index ¶
- func CallClient(ctx *app.Context, clientID string, event pb.Event, msg proto.Message) (*pb.ClientMessage, error)
- func CallClientWrapper[R common.RespType](c *app.Context, clientID string, event pb.Event, req proto.Message, resp *R) error
- func GetClient(cfg conf.Config, clientID, joinToken string) (*pb.GetClientResponse, error)
- func GetClientCert(appInstance app.Application, clientID, clientSecret string, ...) []byte
- func InitClient(cfg conf.Config, clientID, joinToken string, ephemeral *bool) (*pb.InitClientResponse, error)
- func NewClientsManager() app.ClientsManager
- func NewMasterCli(appInstance app.Application) *masterClient
- func Recv(appInstance app.Application, 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) *defs.Connector
- func (c *ClientsManagerImpl) GetLastSeenAt(cliID string) (time.Time, bool)
- func (c *ClientsManagerImpl) Remove(cliID string)
- func (c *ClientsManagerImpl) Set(cliID, clientType string, sender pb.Master_ServerSendServer)
- func (c *ClientsManagerImpl) UpdateLastSeenAt(cliID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallClient ¶
func CallClientWrapper ¶
func GetClientCert ¶
func GetClientCert(appInstance app.Application, clientID, clientSecret string, clientType pb.ClientType) []byte
func InitClient ¶
func NewClientsManager ¶
func NewClientsManager() app.ClientsManager
func NewMasterCli ¶
func NewMasterCli(appInstance app.Application) *masterClient
Types ¶
type ClientsManager ¶
type ClientsManagerImpl ¶
type ClientsManagerImpl struct {
// contains filtered or unexported fields
}
func (*ClientsManagerImpl) ClientAddr ¶
func (c *ClientsManagerImpl) ClientAddr(cliID string) string
func (*ClientsManagerImpl) ConnectTime ¶
func (c *ClientsManagerImpl) ConnectTime(cliID string) (time.Time, bool)
func (*ClientsManagerImpl) Get ¶
func (c *ClientsManagerImpl) Get(cliID string) *defs.Connector
Get implements ClientsManager.
func (*ClientsManagerImpl) GetLastSeenAt ¶ added in v0.1.25
func (c *ClientsManagerImpl) GetLastSeenAt(cliID string) (time.Time, bool)
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.
func (*ClientsManagerImpl) UpdateLastSeenAt ¶ added in v0.1.25
func (c *ClientsManagerImpl) UpdateLastSeenAt(cliID string)
Click to show internal directories.
Click to hide internal directories.