Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlowClient ¶
type FlowClient struct {
// contains filtered or unexported fields
}
FlowClient describes a flow client connection
func NewFlowClient ¶
func NewFlowClient(addr string, port int, authOpts *shttp.AuthenticationOpts) (*FlowClient, error)
NewFlowClient creates a flow client and creates a new connection to the server
func (*FlowClient) SendFlows ¶
func (c *FlowClient) SendFlows(flows []*flow.Flow)
SendFlows implements the flow Sender interface
func (*FlowClient) SendMessage ¶
func (c *FlowClient) SendMessage(m *flow.Message) error
SendMessage sends a flow to the server
type FlowClientConn ¶
FlowClientConn is the interface to be implemented by the flow clients
type FlowClientPool ¶
type FlowClientPool struct { common.RWMutex ws.DefaultSpeakerEventHandler // contains filtered or unexported fields }
FlowClientPool describes a flow client pool.
func NewFlowClientPool ¶
func NewFlowClientPool(pool ws.SpeakerPool, authOpts *shttp.AuthenticationOpts) *FlowClientPool
NewFlowClientPool returns a new FlowClientPool using the websocket connections to maintain the pool of client up to date according to the websocket connections status.
func (*FlowClientPool) OnConnected ¶
func (p *FlowClientPool) OnConnected(c ws.Speaker)
OnConnected websocket event handler
func (*FlowClientPool) OnDisconnected ¶
func (p *FlowClientPool) OnDisconnected(c ws.Speaker)
OnDisconnected websocket event handler
func (*FlowClientPool) SendFlows ¶
func (p *FlowClientPool) SendFlows(flows []*flow.Flow)
SendFlows implements the flow Sender interface
type FlowClientUDPConn ¶
type FlowClientUDPConn struct {
// contains filtered or unexported fields
}
FlowClientUDPConn describes UDP client connection
func NewFlowClientUDPConn ¶
func NewFlowClientUDPConn(addr string, port int) (*FlowClientUDPConn, error)
NewFlowClientUDPConn returns a new UDP flow client
func (*FlowClientUDPConn) Connect ¶
func (c *FlowClientUDPConn) Connect() (err error)
Connect to the UDP flow server
func (*FlowClientUDPConn) Send ¶
func (c *FlowClientUDPConn) Send(data []byte) error
Send data over the wire
type FlowClientWebSocketConn ¶
type FlowClientWebSocketConn struct { ws.DefaultSpeakerEventHandler // contains filtered or unexported fields }
FlowClientWebSocketConn describes WebSocket client connection
func NewFlowClientWebSocketConn ¶
func NewFlowClientWebSocketConn(url *url.URL, authOpts *shttp.AuthenticationOpts) (*FlowClientWebSocketConn, error)
NewFlowClientWebSocketConn returns a new WebSocket flow client
func (*FlowClientWebSocketConn) Close ¶
func (c *FlowClientWebSocketConn) Close() error
Close the connection
func (*FlowClientWebSocketConn) Connect ¶
func (c *FlowClientWebSocketConn) Connect() (err error)
Connect to the WebSocket flow server
func (*FlowClientWebSocketConn) Send ¶
func (c *FlowClientWebSocketConn) Send(data []byte) error
Send data over the wire