Documentation
¶
Index ¶
- type Client
- type Config
- type Message
- type MessageHandler
- type Server
- func (server *Server) AgentPing(agentTarget *types.Target) bool
- func (server *Server) AgentVersion(agentTarget *types.Target) string
- func (s *Server) GetClientVersion(clientID string) string
- func (s *Server) IsClientConnected(clientID string) bool
- func (s *Server) RegisterHandler(msgType string, handler MessageHandler) UnregisterFunc
- func (s *Server) SendToClient(clientID string, msg Message) error
- func (s *Server) ServeWS(w http.ResponseWriter, r *http.Request)
- func (s *Server) Shutdown(ctx context.Context) error
- type ServerOption
- type UnregisterFunc
- type WSClient
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶ added in v0.8.0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AgentVersion ¶ added in v0.9.3
func (*Server) GetClientVersion ¶ added in v0.9.2
func (*Server) IsClientConnected ¶ added in v0.7.1
func (*Server) RegisterHandler ¶ added in v0.8.0
func (s *Server) RegisterHandler(msgType string, handler MessageHandler) UnregisterFunc
func (*Server) SendToClient ¶ added in v0.7.1
type ServerOption ¶ added in v0.10.0
type ServerOption func(*Server)
func WithWorkerPoolSize ¶ added in v0.10.0
func WithWorkerPoolSize(size int) ServerOption
type UnregisterFunc ¶ added in v0.10.2
type UnregisterFunc func()
type WSClient ¶ added in v0.8.0
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶ added in v0.8.0
func (*WSClient) GetConnectionStatus ¶ added in v0.8.0
func (*WSClient) RegisterHandler ¶ added in v0.8.0
func (c *WSClient) RegisterHandler(msgType string, handler MessageHandler) UnregisterFunc
type WorkerPool ¶ added in v0.10.0
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶ added in v0.10.0
func NewWorkerPool(size int) *WorkerPool
func (*WorkerPool) Submit ¶ added in v0.10.0
func (p *WorkerPool) Submit(ctx context.Context, task func()) error
func (*WorkerPool) Wait ¶ added in v0.10.0
func (p *WorkerPool) Wait()
Click to show internal directories.
Click to hide internal directories.