Documentation ¶
Index ¶
- type ConnStatus
- type Forwarder
- func (t *Forwarder) GetMaster() ws.Speaker
- func (t *Forwarder) OnEdgeAdded(e *graph.Edge)
- func (t *Forwarder) OnEdgeDeleted(e *graph.Edge)
- func (t *Forwarder) OnEdgeUpdated(e *graph.Edge)
- func (t *Forwarder) OnNewMaster(c ws.Speaker)
- func (t *Forwarder) OnNodeAdded(n *graph.Node)
- func (t *Forwarder) OnNodeDeleted(n *graph.Node)
- func (t *Forwarder) OnNodeUpdated(n *graph.Node)
- type Opts
- type Pod
- type PublisherEndpoint
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnStatus ¶
type ConnStatus struct { websocket.ConnStatus IsMaster bool }
ConnStatus represents the status of a connection to a hub
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder forwards the topology to only one master server. When switching from one analyzer to another one the agent does a full re-sync since some messages could have been lost.
func NewForwarder ¶
NewForwarder returns a new Graph forwarder which forwards event of the given graph to the given WebSocket JSON speakers.
func (*Forwarder) GetMaster ¶
GetMaster returns the current analyzer the agent is sending its events to
func (*Forwarder) OnEdgeAdded ¶
OnEdgeAdded graph edge added event. Implements the EventListener interface.
func (*Forwarder) OnEdgeDeleted ¶
OnEdgeDeleted graph edge deleted event. Implements the EventListener interface.
func (*Forwarder) OnEdgeUpdated ¶
OnEdgeUpdated graph edge updated event. Implements the EventListener interface.
func (*Forwarder) OnNewMaster ¶
OnNewMaster is called by the master election mechanism when a new master is elected. In such case a "Re-sync" is triggered in order to be in sync with the new master.
func (*Forwarder) OnNodeAdded ¶
OnNodeAdded graph node added event. Implements the EventListener interface.
func (*Forwarder) OnNodeDeleted ¶
OnNodeDeleted graph node deleted event. Implements the EventListener interface.
func (*Forwarder) OnNodeUpdated ¶
OnNodeUpdated graph node updated event. Implements the EventListener interface.
type Opts ¶
type Opts struct { ServerOpts websocket.ServerOpts Validator validator.Validator }
Opts defines pod server options
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
Pod describes a graph pod. It maintains a local graph in memory and forward any event to graph hubs
func NewPod ¶
func NewPod(server *api.Server, clientPool *websocket.StructClientPool, g *graph.Graph, apiAuthBackend shttp.AuthenticationBackend, clusterAuthOptions *shttp.AuthenticationOpts, tr *traversal.GremlinTraversalParser, opts Opts) (*Pod, error)
NewPod returns a new pod
func (*Pod) SubscriberServer ¶
func (p *Pod) SubscriberServer() *websocket.StructServer
SubscriberServer returns the websocket server dedicated to subscribers
type PublisherEndpoint ¶
type PublisherEndpoint struct { common.RWMutex ws.DefaultSpeakerEventHandler Graph *graph.Graph // contains filtered or unexported fields }
PublisherEndpoint serves the graph for external publishers, for instance an external program that interacts with the Skydive graph.
func NewPublisherEndpoint ¶
func NewPublisherEndpoint(pool ws.StructSpeakerPool, g *graph.Graph, validator validator.Validator) (*PublisherEndpoint, error)
NewPublisherEndpoint returns a new server for external publishers.
func (*PublisherEndpoint) OnStructMessage ¶
func (t *PublisherEndpoint) OnStructMessage(c ws.Speaker, msg *ws.StructMessage)
OnStructMessage is triggered by message coming from a publisher.
type Status ¶
type Status struct { Subscribers map[string]websocket.ConnStatus Hubs map[string]ConnStatus }
Status describes the status of a pod