Documentation ¶
Index ¶
- Variables
- func RegisterConfigAPI(r *shttp.Server, authBackend shttp.AuthenticationBackend)
- func RegisterPcapAPI(r *shttp.Server, store storage.Storage, ...)
- type CaptureAPIHandler
- type CaptureResourceHandler
- type EdgeRuleAPI
- type EdgeRuleResourceHandler
- type NodeRuleAPI
- type NodeRuleResourceHandler
- type PacketInjectorAPI
- type PcapAPI
Constants ¶
This section is empty.
Variables ¶
var TopologyMarshallers = api.TopologyMarshallers{
"text/vnd.graphviz": dotMarshaller,
"application/vnd.tcpdump.pcap": pcapMarshaller,
}
TopologyMarshallers hold the dot and pcap marshallers
Functions ¶
func RegisterConfigAPI ¶
func RegisterConfigAPI(r *shttp.Server, authBackend shttp.AuthenticationBackend)
RegisterConfigAPI registers a configuration endpoint (read only) in API server
func RegisterPcapAPI ¶
func RegisterPcapAPI(r *shttp.Server, store storage.Storage, authBackend shttp.AuthenticationBackend)
RegisterPcapAPI registers a new pcap injector API
Types ¶
type CaptureAPIHandler ¶
type CaptureAPIHandler struct { rest.BasicAPIHandler Graph *graph.Graph }
CaptureAPIHandler based on BasicAPIHandler
func RegisterCaptureAPI ¶
func RegisterCaptureAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) *CaptureAPIHandler
RegisterCaptureAPI registers an new resource, capture
func (*CaptureAPIHandler) Create ¶
func (c *CaptureAPIHandler) Create(r rest.Resource, opts *rest.CreateOptions) error
Create tests that resource GremlinQuery does not exists already
func (*CaptureAPIHandler) Decorate ¶
func (c *CaptureAPIHandler) Decorate(resource rest.Resource)
Decorate populates the capture resource
type CaptureResourceHandler ¶
type CaptureResourceHandler struct {
rest.ResourceHandler
}
CaptureResourceHandler describes a capture ressouce handler
func (*CaptureResourceHandler) Name ¶
func (c *CaptureResourceHandler) Name() string
Name returns "capture"
func (*CaptureResourceHandler) New ¶
func (c *CaptureResourceHandler) New() rest.Resource
New creates a new capture resource
type EdgeRuleAPI ¶ added in v0.19.1
type EdgeRuleAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
EdgeRuleAPI based on BasicAPIHandler
func RegisterEdgeRuleAPI ¶ added in v0.19.1
func RegisterEdgeRuleAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) *EdgeRuleAPI
RegisterEdgeRuleAPI registers an EdgeRule's API to a designated API Server
type EdgeRuleResourceHandler ¶ added in v0.19.1
type EdgeRuleResourceHandler struct {
rest.ResourceHandler
}
EdgeRuleResourceHandler describes a edge rule resource handler
func (*EdgeRuleResourceHandler) Name ¶ added in v0.19.1
func (erh *EdgeRuleResourceHandler) Name() string
Name returns resource name "edgerule"
func (*EdgeRuleResourceHandler) New ¶ added in v0.19.1
func (erh *EdgeRuleResourceHandler) New() rest.Resource
New creates a new EdgeRule
type NodeRuleAPI ¶ added in v0.19.1
type NodeRuleAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
NodeRuleAPI based on BasicAPIHandler
func RegisterNodeRuleAPI ¶ added in v0.19.1
func RegisterNodeRuleAPI(apiServer *api.Server, g *graph.Graph, authBackend shttp.AuthenticationBackend) *NodeRuleAPI
RegisterNodeRuleAPI register a new node rule api handler
type NodeRuleResourceHandler ¶ added in v0.19.1
type NodeRuleResourceHandler struct {
rest.ResourceHandler
}
NodeRuleResourceHandler describes a node resource handler
func (*NodeRuleResourceHandler) Name ¶ added in v0.19.1
func (nrh *NodeRuleResourceHandler) Name() string
Name returns resource name "noderule"
func (*NodeRuleResourceHandler) New ¶ added in v0.19.1
func (nrh *NodeRuleResourceHandler) New() rest.Resource
New creates a new node rule
type PacketInjectorAPI ¶
type PacketInjectorAPI struct { rest.BasicAPIHandler Graph *graph.Graph }
PacketInjectorAPI exposes the packet injector API
func RegisterPacketInjectorAPI ¶
func RegisterPacketInjectorAPI(g *graph.Graph, apiServer *api.Server, authBackend shttp.AuthenticationBackend) *PacketInjectorAPI
RegisterPacketInjectorAPI registers a new packet injector resource in the API
func (*PacketInjectorAPI) Create ¶
func (pi *PacketInjectorAPI) Create(r rest.Resource, opts *rest.CreateOptions) error
Create allocates a new packet injection