Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
Resource
UUID string
Name string `json:",omitempty"`
Description string `json:",omitempty"`
Expression string `json:",omitempty" valid:"nonzero"`
Action string `json:",omitempty" valid:"regexp=^(|http://|https://|file://).*$"`
Trigger string `json:",omitempty" valid:"regexp=^(graph|duration:.+|)$"`
CreateTime time.Time
}
Alert is a set of parameters, the Alert Action will Trigger according to its Expression.
type AnalyzerStatus ¶
type AnalyzerStatus struct {
Agents map[string]shttp.WSConnStatus
Peers PeersStatus
Publishers map[string]shttp.WSConnStatus
Subscribers map[string]shttp.WSConnStatus
Alerts ElectionStatus
Captures ElectionStatus
Probes []string
}
AnalyzerStatus describes the status of an analyzer
type Capture ¶
type Capture struct {
UUID string
GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr"`
BPFFilter string `json:"BPFFilter,omitempty" valid:"isBPFFilter"`
Name string `json:"Name,omitempty"`
Description string `json:"Description,omitempty"`
Type string `json:"Type,omitempty"`
Count int `json:"Count"`
PCAPSocket string `json:"PCAPSocket,omitempty"`
Port int `json:"Port,omitempty"`
RawPacketLimit int `json:"RawPacketLimit,omitempty" valid:"isValidRawPacketLimit"`
HeaderSize int `json:"HeaderSize,omitempty" valid:"isValidCaptureHeaderSize"`
ExtraTCPMetric bool `json:"ExtraTCPMetric"`
IPDefrag bool `json:"IPDefrag"`
ReassembleTCP bool `json:"ReassembleTCP"`
LayerKeyMode string `json:"LayerKeyMode,omitempty" valid:"isValidLayerKeyMode"`
}
Capture describes a capture API
func NewCapture ¶
NewCapture creates a new capture
type ElectionStatus ¶
type ElectionStatus struct {
IsMaster bool
}
ElectionStatus describes the status of an election
type PacketInjection ¶ added in v0.18.0
type PacketInjection struct {
UUID string
Src string
Dst string
SrcIP string
DstIP string
SrcMAC string
DstMAC string
SrcPort int64
DstPort int64
Type string
Payload string
TrackingID string
ICMPID int64
Count int64
Interval int64
Increment bool
StartTime time.Time
}
PacketInjection packet injector API parameters
func (*PacketInjection) ID ¶ added in v0.18.0
func (pi *PacketInjection) ID() string
ID returns the packet injector request identifier
func (*PacketInjection) SetID ¶ added in v0.18.0
func (pi *PacketInjection) SetID(id string)
SetID set a new identifier for this injector
func (*PacketInjection) Validate ¶ added in v0.18.0
func (pi *PacketInjection) Validate() error
Validate verifies the packet injection type is supported
type PeersStatus ¶
type PeersStatus struct {
Incomers map[string]shttp.WSConnStatus
Outgoers map[string]shttp.WSConnStatus
}
PeersStatus describes the state of a peer
type Resource ¶
Resource used as interface resources for each API
type TopologyParam ¶
type TopologyParam struct {
GremlinQuery string `json:"GremlinQuery,omitempty" valid:"isGremlinExpr"`
}
TopologyParam topology API parameter
type UserMetadata ¶
type UserMetadata struct {
UUID string
GremlinQuery string `valid:"isGremlinExpr"`
Key string `valid:"nonzero"`
Value string `valid:"nonzero"`
}
UserMetadata describes a user metadata
func NewUserMetadata ¶
func NewUserMetadata(query string, key string, value string) *UserMetadata
NewUserMetadata creates a new user metadata
func (*UserMetadata) ID ¶
func (m *UserMetadata) ID() string
ID returns the user metadata identifier
func (*UserMetadata) SetID ¶
func (m *UserMetadata) SetID(id string)
SetID set a new identifier for this user metadata
Source Files
¶
- types.go