Documentation ¶
Overview ¶
Package types defines the API resource types
swagger:meta
Index ¶
- Constants
- Variables
- type Capture
- type Edge
- type EdgeRule
- type Node
- type NodeRule
- type PacketInjection
- func (pi *PacketInjection) GetName() string
- func (v PacketInjection) MarshalEasyJSON(w *jwriter.Writer)
- func (v PacketInjection) MarshalJSON() ([]byte, error)
- func (v *PacketInjection) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *PacketInjection) UnmarshalJSON(data []byte) error
- func (pi *PacketInjection) Validate() error
Constants ¶
const ( // PIModeUniqPerNode use a unique packet identifier per source node PIModeUniqPerNode = "unique" // PIModeRandom use random packet identifier for each packet PIModeRandom = "random" // PITypeICMP4 icmpv4 packet PITypeICMP4 = "icmp4" // PITypeICMP6 icmpv6 packet PITypeICMP6 = "icmp6" // PITypeTCP4 ipv4 + tcp packet PITypeTCP4 = "tcp4" // PITypeTCP6 ipv6 + tcp packet PITypeTCP6 = "tcp6" // PITypeUDP4 ipv4 + udp packet PITypeUDP4 = "udp4" // PITypeUDP6 ipv6 + udp packet PITypeUDP6 = "udp6" )
Variables ¶
var SchemaValidator schema.Validator
SchemaValidator validates resources against JSON schemas
Functions ¶
This section is empty.
Types ¶
type Capture ¶
type Capture struct { // swagger:allOf rest.BasicResource `yaml:",inline"` // Gremlin Query // required: true GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr" yaml:"GremlinQuery"` // BPF filter BPFFilter string `json:"BPFFilter,omitempty" valid:"isBPFFilter" yaml:"BPFFilter"` // Capture name Name string `json:"Name,omitempty" yaml:"Name"` // Capture description Description string `json:"Description,omitempty" yaml:"Description"` // Capture type. Can be afpacket, pcap, ebpf, sflow, pcapsocket, ovsmirror, dpdk, ovssflow or ovsnetflow Type string `json:"Type,omitempty" valid:"isValidCaptureType" yaml:"Type"` // Number of active captures // swagger:ignore Count int `json:"Count" yaml:"Count"` // SFlow port Port int `json:"Port,omitempty" yaml:"Port"` // Sampling rate for SFlow flows. 0: no flow samples SamplingRate uint32 `json:"SamplingRate" yaml:"SamplingRate"` // Polling interval for SFlow counters, 0: no counter samples PollingInterval uint32 `json:"PollingInterval" yaml:"PollingInterval"` // Maximum number of raw packets captured, 0: no packet, -1: unlimited RawPacketLimit int `json:"RawPacketLimit,omitempty" valid:"isValidRawPacketLimit" yaml:"RawPacketLimit"` // Packet header size to consider HeaderSize int `json:"HeaderSize,omitempty" valid:"isValidCaptureHeaderSize" yaml:"HeaderSize"` // Add additional TCP metrics to flows ExtraTCPMetric bool `json:"ExtraTCPMetric" yaml:"ExtraTCPMetric"` // Defragment IPv4 packets IPDefrag bool `json:"IPDefrag" yaml:"IPDefrag"` // Reassemble TCP packets ReassembleTCP bool `json:"ReassembleTCP" yaml:"ReassembleTCP"` // First layer used by flow key calculation, L2 or L3 LayerKeyMode string `json:"LayerKeyMode,omitempty" valid:"isValidLayerKeyMode" yaml:"LayerKeyMode"` // List of extra layers to be added to the flow, available: DNS|DHCPv4|VRRP ExtraLayers int `json:"ExtraLayers,omitempty" yaml:"ExtraLayers"` // sFlow/NetFlow target, if empty the agent will be used Target string `json:"Target,omitempty" valid:"isValidAddress" yaml:"Target"` // target type (netflowv5, erspanv1), ignored in case of sFlow/NetFlow capture TargetType string `json:"TargetType,omitempty" yaml:"TargetType"` }
Capture object
Captures provide a way to capture network traffic on the nodes matching a Gremlin expression.
easyjson:json swagger:model Capture
func NewCapture ¶
NewCapture creates a new capture
func (Capture) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Capture) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Capture) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Capture) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type EdgeRule ¶ added in v0.19.1
type EdgeRule struct { // swagger:allOf rest.BasicResource `yaml:",inline"` // Edge rule name Name string `yaml:"Name"` // Edge rule description Description string `yaml:"Description"` // Gremlin expression of the edges source nodes Src string `valid:"isGremlinExpr" yaml:"Src"` // Gremlin expression of the edges destination nodes Dst string `valid:"isGremlinExpr" yaml:"Dst"` // Metadata of the edges to create Metadata graph.Metadata `yaml:"Metadata"` }
EdgeRule object
Edge rules allow the dynamic creation of links between nodes of the graph.
easyjson:json swagger:model
func (EdgeRule) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (EdgeRule) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*EdgeRule) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EdgeRule) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type NodeRule ¶ added in v0.19.1
type NodeRule struct { // swagger:allOf rest.BasicResource `yaml:",inline"` // Node rule name Name string `yaml:"Name"` // Node rule description Description string `yaml:"Description"` // Metadata of the nodes to create Metadata graph.Metadata `yaml:"Metadata"` // 'create' to create nodes, 'update' to updates nodes Action string `valid:"regexp=^(create|update)$" yaml:"Action"` // Gremlin expression of the nodes to update Query string `valid:"isGremlinOrEmpty" yaml:"Query"` }
NodeRule object
Node rules allow the dynamic creation of nodes in the graph.
easyjson:json swagger:model
func (NodeRule) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (NodeRule) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*NodeRule) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NodeRule) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type PacketInjection ¶ added in v0.17.0
type PacketInjection struct { // swagger:allOf rest.BasicResource `yaml:",inline"` Src string `yaml:"Src"` Dst string `yaml:"Dst"` SrcIP string `valid:"isIPOrCIDR" yaml:"SrcIP"` DstIP string `valid:"isIPOrCIDR" yaml:"DstIP"` SrcMAC string `valid:"isMAC" yaml:"SrcMAC"` DstMAC string `valid:"isMAC" yaml:"DstMAC"` SrcPort uint16 `yaml:"SrcPort"` DstPort uint16 `yaml:"DstPort"` Type string `yaml:"Type"` Payload string `yaml:"Payload"` ICMPID uint16 `yaml:"ICMPID"` Count uint64 `yaml:"Count"` Interval uint64 `yaml:"Interval"` Mode string `yaml:"Mode"` IncrementPayload int64 `yaml:"IncrementPayload"` StartTime time.Time Pcap []byte `yaml:"Pcap"` TTL uint8 `yaml:"TTL"` }
PacketInjection packet injector API parameters easyjson:json swagger:model
func (*PacketInjection) GetName ¶ added in v0.24.0
func (pi *PacketInjection) GetName() string
GetName returns the resource name
func (PacketInjection) MarshalEasyJSON ¶ added in v0.26.0
func (v PacketInjection) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PacketInjection) MarshalJSON ¶ added in v0.26.0
func (v PacketInjection) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PacketInjection) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *PacketInjection) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PacketInjection) UnmarshalJSON ¶ added in v0.26.0
func (v *PacketInjection) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (*PacketInjection) Validate ¶ added in v0.17.0
func (pi *PacketInjection) Validate() error
Validate verifies the packet injection type is supported