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 ¶ added in v0.23.0
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 ¶ added in v0.23.0
NewForwarder returns a new Graph forwarder which forwards event of the given graph to the given WebSocket JSON speakers.
func (*Forwarder) GetMaster ¶ added in v0.23.0
GetMaster returns the current analyzer the agent is sending its events to
func (*Forwarder) OnEdgeAdded ¶ added in v0.23.0
OnEdgeAdded graph edge added event. Implements the EventListener interface.
func (*Forwarder) OnEdgeDeleted ¶ added in v0.23.0
OnEdgeDeleted graph edge deleted event. Implements the EventListener interface.
func (*Forwarder) OnEdgeUpdated ¶ added in v0.23.0
OnEdgeUpdated graph edge updated event. Implements the EventListener interface.
func (*Forwarder) OnNewMaster ¶ added in v0.23.0
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 ¶ added in v0.23.0
OnNodeAdded graph node added event. Implements the EventListener interface.
func (*Forwarder) OnNodeDeleted ¶ added in v0.23.0
OnNodeDeleted graph node deleted event. Implements the EventListener interface.
func (*Forwarder) OnNodeUpdated ¶ added in v0.23.0
OnNodeUpdated graph node updated event. Implements the EventListener interface.
type Opts ¶ added in v0.23.0
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 ¶ added in v0.23.0
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 ¶ added in v0.23.0
func NewPublisherEndpoint(pool ws.StructSpeakerPool, g *graph.Graph, validator validator.Validator) (*PublisherEndpoint, error)
NewPublisherEndpoint returns a new server for external publishers.
func (*PublisherEndpoint) OnStructMessage ¶ added in v0.23.0
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