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) Register(client *Client)
- func (s *Server) RegisterHandler() (<-chan Message, func())
- func (s *Server) Run()
- func (s *Server) SendToClient(clientID string, msg Message) error
- func (s *Server) ServeWS(w http.ResponseWriter, r *http.Request)
- func (s *Server) Unregister(client *Client)
- type WSClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶ added in v0.8.0
type MessageHandler func(msg *Message)
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 (*Server) SendToClient ¶ added in v0.7.1
func (*Server) ServeWS ¶ added in v0.7.1
func (s *Server) ServeWS(w http.ResponseWriter, r *http.Request)
func (*Server) Unregister ¶ added in v0.8.0
type WSClient ¶ added in v0.8.0
type WSClient struct { ClientID string TLSConfig *tls.Config IsConnected bool // 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)
Click to show internal directories.
Click to hide internal directories.