server

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 21 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (*CaptureAPIHandler) Update added in v0.27.0

func (c *CaptureAPIHandler) Update(id string, resource rest.Resource) (rest.Resource, bool, error)

Update a capture

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

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

func (*EdgeRuleAPI) Update added in v0.27.0

func (a *EdgeRuleAPI) Update(id string, resource rest.Resource) (rest.Resource, bool, error)

Update an edge rule

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

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

func (*NodeRuleAPI) Update added in v0.27.0

func (a *NodeRuleAPI) Update(id string, resource rest.Resource) (rest.Resource, bool, error)

Update an edge rule

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

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

func (*PacketInjectorAPI) Update added in v0.27.0

func (pi *PacketInjectorAPI) Update(id string, resource rest.Resource) (rest.Resource, bool, error)

Update a packet injection

type PcapAPI

type PcapAPI struct {
	// contains filtered or unexported fields
}

PcapAPI exposes the pcap injector API

func (*PcapAPI) SendFlows added in v0.24.0

func (p *PcapAPI) SendFlows(flows []*flow.Flow)

SendFlows implements the flow Sender interface

func (*PcapAPI) SendStats added in v0.26.0

func (p *PcapAPI) SendStats(status flow.Stats)

SendStats implements the flow Sender interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL