Documentation ¶
Index ¶
- Constants
- func ClusterAuthenticationOpts() *shttp.AuthenticationOpts
- func NewESConfig(name ...string) es.Config
- func NewTopologyProbeBundleFromConfig(g *graph.Graph) (*probe.Bundle, error)
- type ElectionStatus
- type FlowClient
- type FlowClientConn
- type FlowClientPool
- type FlowClientUDPConn
- type FlowClientWebSocketConn
- type FlowServer
- type FlowServerConn
- type FlowServerUDPConn
- type FlowServerWebSocketConn
- type FlowSubscriberEndpoint
- type Server
- type Status
Constants ¶
const ( // FlowBulkInsertDefault maximum number of flows aggregated between two data store inserts FlowBulkInsertDefault int = 100 // FlowBulkInsertDeadlineDefault deadline of each bulk insert in second FlowBulkInsertDeadlineDefault int = 5 // FlowBulkMaxDelayDefault delay between two bulk FlowBulkMaxDelayDefault int = 5 )
Variables ¶
This section is empty.
Functions ¶
func ClusterAuthenticationOpts ¶ added in v0.21.0
func ClusterAuthenticationOpts() *shttp.AuthenticationOpts
ClusterAuthenticationOpts returns auth info to connect to an analyzer from the configuration
func NewESConfig ¶ added in v0.22.0
NewESConfig returns a new elasticsearch configuration for the given backend name
Types ¶
type ElectionStatus ¶ added in v0.13.0
type ElectionStatus struct {
IsMaster bool
}
ElectionStatus describes the status of an election
type FlowClient ¶ added in v0.10.0
type FlowClient struct {
// contains filtered or unexported fields
}
FlowClient describes a flow client connection
func NewFlowClient ¶ added in v0.10.0
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) SendFlow ¶ added in v0.10.0
func (c *FlowClient) SendFlow(f *flow.Flow) error
SendFlow sends a flow to the server
func (*FlowClient) SendFlows ¶ added in v0.10.0
func (c *FlowClient) SendFlows(flowArray *flow.FlowArray)
SendFlows sends flows to the server
type FlowClientConn ¶ added in v0.10.0
FlowClientConn is the interface to be implemented by the flow clients
type FlowClientPool ¶ added in v0.10.0
type FlowClientPool struct { common.RWMutex ws.DefaultSpeakerEventHandler // contains filtered or unexported fields }
FlowClientPool describes a flow client pool.
func NewFlowClientPool ¶ added in v0.10.0
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) Close ¶ added in v0.10.0
func (p *FlowClientPool) Close()
Close all connections
func (*FlowClientPool) OnConnected ¶ added in v0.10.0
func (p *FlowClientPool) OnConnected(c ws.Speaker)
OnConnected websocket event handler
func (*FlowClientPool) OnDisconnected ¶ added in v0.10.0
func (p *FlowClientPool) OnDisconnected(c ws.Speaker)
OnDisconnected websocket event handler
func (*FlowClientPool) SendFlows ¶ added in v0.10.0
func (p *FlowClientPool) SendFlows(flowArray *flow.FlowArray)
SendFlows sends flows using a random connection
type FlowClientUDPConn ¶ added in v0.13.0
type FlowClientUDPConn struct {
// contains filtered or unexported fields
}
FlowClientUDPConn describes UDP client connection
func NewFlowClientUDPConn ¶ added in v0.13.0
func NewFlowClientUDPConn(addr string, port int) (*FlowClientUDPConn, error)
NewFlowClientUDPConn returns a new UDP flow client
func (*FlowClientUDPConn) Close ¶ added in v0.13.0
func (c *FlowClientUDPConn) Close() error
Close the connection
func (*FlowClientUDPConn) Connect ¶ added in v0.13.0
func (c *FlowClientUDPConn) Connect() (err error)
Connect to the UDP flow server
func (*FlowClientUDPConn) Send ¶ added in v0.13.0
func (c *FlowClientUDPConn) Send(data []byte) error
Send data over the wire
type FlowClientWebSocketConn ¶ added in v0.13.0
type FlowClientWebSocketConn struct { ws.DefaultSpeakerEventHandler // contains filtered or unexported fields }
FlowClientWebSocketConn describes WebSocket client connection
func NewFlowClientWebSocketConn ¶ added in v0.13.0
func NewFlowClientWebSocketConn(url *url.URL, authOpts *shttp.AuthenticationOpts) (*FlowClientWebSocketConn, error)
NewFlowClientWebSocketConn returns a new WebSocket flow client
func (*FlowClientWebSocketConn) Close ¶ added in v0.13.0
func (c *FlowClientWebSocketConn) Close() error
Close the connection
func (*FlowClientWebSocketConn) Connect ¶ added in v0.13.0
func (c *FlowClientWebSocketConn) Connect() (err error)
Connect to the WebSocket flow server
func (*FlowClientWebSocketConn) Send ¶ added in v0.13.0
func (c *FlowClientWebSocketConn) Send(data []byte) error
Send data over the wire
type FlowServer ¶ added in v0.10.0
type FlowServer struct {
// contains filtered or unexported fields
}
FlowServer describes a flow server
func NewFlowServer ¶ added in v0.10.0
func NewFlowServer(s *shttp.Server, g *graph.Graph, store storage.Storage, endpoint *FlowSubscriberEndpoint, probe *probe.Bundle, auth shttp.AuthenticationBackend) (*FlowServer, error)
NewFlowServer creates a new flow server listening at address/port, based on configuration
type FlowServerConn ¶ added in v0.10.0
FlowServerConn describes a flow server connection
type FlowServerUDPConn ¶ added in v0.13.0
type FlowServerUDPConn struct {
// contains filtered or unexported fields
}
FlowServerUDPConn describes a UDP flow server connection
func NewFlowServerUDPConn ¶ added in v0.13.0
func NewFlowServerUDPConn(addr string, port int) (*FlowServerUDPConn, error)
NewFlowServerUDPConn return a new UDP flow server
type FlowServerWebSocketConn ¶ added in v0.13.0
type FlowServerWebSocketConn struct { ws.DefaultSpeakerEventHandler // contains filtered or unexported fields }
FlowServerWebSocketConn describes a WebSocket flow server connection
func NewFlowServerWebSocketConn ¶ added in v0.13.0
func NewFlowServerWebSocketConn(server *shttp.Server, auth shttp.AuthenticationBackend) (*FlowServerWebSocketConn, error)
NewFlowServerWebSocketConn returns a new WebSocket flow server
type FlowSubscriberEndpoint ¶ added in v0.21.0
type FlowSubscriberEndpoint struct {
// contains filtered or unexported fields
}
FlowSubscriberEndpoint sends all the flows to its subscribers.
func NewFlowSubscriberEndpoint ¶ added in v0.21.0
func NewFlowSubscriberEndpoint(pool ws.StructSpeakerPool) *FlowSubscriberEndpoint
NewFlowSubscriberEndpoint returns a new server to be used by external flow subscribers
func (*FlowSubscriberEndpoint) SendFlows ¶ added in v0.21.0
func (fs *FlowSubscriberEndpoint) SendFlows(flowArray *flow.FlowArray)
SendFlows sends flow to the subscribers
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server describes an Analyzer servers mechanism like http, websocket, topology, ondemand probes, ...
func NewServerFromConfig ¶
NewServerFromConfig creates a new empty server
type Status ¶ added in v0.19.1
type Status struct { Agents map[string]ws.ConnStatus Peers hub.PeersStatus Publishers map[string]ws.ConnStatus Subscribers map[string]ws.ConnStatus Alerts ElectionStatus Captures ElectionStatus Probes []string }
Status describes the status of an analyzer