Documentation ¶
Index ¶
- Constants
- Variables
- func AddLayer2Link(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, metadata graph.Metadata) (*graph.Edge, error)
- func AddLink(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, relationType string, ...) (*graph.Edge, error)
- func AddOwnershipLink(g *graph.Graph, parent *graph.Node, child *graph.Node, metadata graph.Metadata) (*graph.Edge, error)
- func ContainerMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
- func GetOwnershipLink(g *graph.Graph, parent *graph.Node, child *graph.Node) *graph.Edge
- func HaveLayer2Link(g *graph.Graph, node1 *graph.Node, node2 *graph.Node) bool
- func HaveLink(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, relationType string) bool
- func HaveOwnershipLink(g *graph.Graph, parent *graph.Node, child *graph.Node) bool
- func InterfaceMetricMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
- func IsInterfaceUp(node *graph.Node) bool
- func IsOwnershipLinked(g *graph.Graph, node *graph.Node) bool
- func Layer2Metadata() graph.Metadata
- func NamespaceFromNode(g *graph.Graph, n *graph.Node) (string, string, error)
- func NeighborMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
- func NewLink(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, relationType string, ...) (*graph.Edge, error)
- func NewNetNSContextByNode(g *graph.Graph, n *graph.Node) (*netns.Context, error)
- func OwnershipMetadata() graph.Metadata
- func RegisterContainer()
- func RoutingTablesMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
- type ContainerMetadata
- func (obj *ContainerMetadata) GetField(key string) (interface{}, error)
- func (obj *ContainerMetadata) GetFieldBool(key string) (bool, error)
- func (obj *ContainerMetadata) GetFieldInt64(key string) (int64, error)
- func (obj *ContainerMetadata) GetFieldKeys() []string
- func (obj *ContainerMetadata) GetFieldString(key string) (string, error)
- func (v ContainerMetadata) MarshalEasyJSON(w *jwriter.Writer)
- func (v ContainerMetadata) MarshalJSON() ([]byte, error)
- func (obj *ContainerMetadata) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *ContainerMetadata) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *ContainerMetadata) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *ContainerMetadata) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ContainerMetadata) UnmarshalJSON(data []byte) error
- type HostNodeTIDMap
- type Hosts
- func (obj *Hosts) GetField(key string) (interface{}, error)
- func (obj *Hosts) GetFieldBool(key string) (bool, error)
- func (obj *Hosts) GetFieldInt64(key string) (int64, error)
- func (obj *Hosts) GetFieldKeys() []string
- func (obj *Hosts) GetFieldString(key string) (string, error)
- func (v Hosts) MarshalEasyJSON(w *jwriter.Writer)
- func (v Hosts) MarshalJSON() ([]byte, error)
- func (obj *Hosts) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *Hosts) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *Hosts) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *Hosts) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Hosts) UnmarshalJSON(data []byte) error
- type InterfaceMetric
- func (im *InterfaceMetric) Add(m common.Metric) common.Metric
- func (obj *InterfaceMetric) GetField(key string) (interface{}, error)
- func (obj *InterfaceMetric) GetFieldBool(key string) (bool, error)
- func (obj *InterfaceMetric) GetFieldInt64(key string) (int64, error)
- func (obj *InterfaceMetric) GetFieldKeys() []string
- func (obj *InterfaceMetric) GetFieldString(key string) (string, error)
- func (im *InterfaceMetric) GetLast() int64
- func (im *InterfaceMetric) GetStart() int64
- func (im *InterfaceMetric) IsZero() bool
- func (v InterfaceMetric) MarshalEasyJSON(w *jwriter.Writer)
- func (v InterfaceMetric) MarshalJSON() ([]byte, error)
- func (obj *InterfaceMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *InterfaceMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *InterfaceMetric) MatchString(key string, predicate getter.StringPredicate) bool
- func (im *InterfaceMetric) SetLast(last int64)
- func (im *InterfaceMetric) SetStart(start int64)
- func (im *InterfaceMetric) Split(cut int64) (common.Metric, common.Metric)
- func (im *InterfaceMetric) Sub(m common.Metric) common.Metric
- func (v *InterfaceMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *InterfaceMetric) UnmarshalJSON(data []byte) error
- type Neighbor
- func (obj *Neighbor) GetField(key string) (interface{}, error)
- func (obj *Neighbor) GetFieldBool(key string) (bool, error)
- func (obj *Neighbor) GetFieldInt64(key string) (int64, error)
- func (obj *Neighbor) GetFieldKeys() []string
- func (obj *Neighbor) GetFieldString(key string) (string, error)
- func (v Neighbor) MarshalEasyJSON(w *jwriter.Writer)
- func (v Neighbor) MarshalJSON() ([]byte, error)
- func (obj *Neighbor) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *Neighbor) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *Neighbor) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *Neighbor) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Neighbor) UnmarshalJSON(data []byte) error
- type Neighbors
- func (obj *Neighbors) GetField(key string) (interface{}, error)
- func (obj *Neighbors) GetFieldBool(key string) (bool, error)
- func (obj *Neighbors) GetFieldInt64(key string) (int64, error)
- func (obj *Neighbors) GetFieldKeys() []string
- func (obj *Neighbors) GetFieldString(key string) (string, error)
- func (v Neighbors) MarshalEasyJSON(w *jwriter.Writer)
- func (v Neighbors) MarshalJSON() ([]byte, error)
- func (obj *Neighbors) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *Neighbors) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *Neighbors) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *Neighbors) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Neighbors) UnmarshalJSON(data []byte) error
- type NextHop
- func (obj *NextHop) GetField(key string) (interface{}, error)
- func (obj *NextHop) GetFieldBool(key string) (bool, error)
- func (obj *NextHop) GetFieldInt64(key string) (int64, error)
- func (obj *NextHop) GetFieldKeys() []string
- func (obj *NextHop) GetFieldString(key string) (string, error)
- func (v NextHop) MarshalEasyJSON(w *jwriter.Writer)
- func (v NextHop) MarshalJSON() ([]byte, error)
- func (obj *NextHop) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *NextHop) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *NextHop) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *NextHop) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *NextHop) UnmarshalJSON(data []byte) error
- type Prefix
- type Route
- func (obj *Route) GetField(key string) (interface{}, error)
- func (obj *Route) GetFieldBool(key string) (bool, error)
- func (obj *Route) GetFieldInt64(key string) (int64, error)
- func (obj *Route) GetFieldKeys() []string
- func (obj *Route) GetFieldString(key string) (string, error)
- func (r *Route) GetNextHop(ip net.IP, ifIndex int64) *NextHop
- func (r *Route) GetOrCreateNextHop(ip net.IP, ifIndex int64, priority int64) *NextHop
- func (v Route) MarshalEasyJSON(w *jwriter.Writer)
- func (v Route) MarshalJSON() ([]byte, error)
- func (obj *Route) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *Route) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *Route) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *Route) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Route) UnmarshalJSON(data []byte) error
- type RoutingTable
- func (obj *RoutingTable) GetField(key string) (interface{}, error)
- func (obj *RoutingTable) GetFieldBool(key string) (bool, error)
- func (obj *RoutingTable) GetFieldInt64(key string) (int64, error)
- func (obj *RoutingTable) GetFieldKeys() []string
- func (obj *RoutingTable) GetFieldString(key string) (string, error)
- func (rt *RoutingTable) GetOrCreateRoute(protocol int64, prefix net.IPNet) *Route
- func (rt *RoutingTable) GetRoute(protocol int64, prefix net.IPNet) *Route
- func (v RoutingTable) MarshalEasyJSON(w *jwriter.Writer)
- func (v RoutingTable) MarshalJSON() ([]byte, error)
- func (obj *RoutingTable) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *RoutingTable) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *RoutingTable) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *RoutingTable) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *RoutingTable) UnmarshalJSON(data []byte) error
- type RoutingTables
- func (obj *RoutingTables) GetField(key string) (interface{}, error)
- func (obj *RoutingTables) GetFieldBool(key string) (bool, error)
- func (obj *RoutingTables) GetFieldInt64(key string) (int64, error)
- func (obj *RoutingTables) GetFieldKeys() []string
- func (obj *RoutingTables) GetFieldString(key string) (string, error)
- func (v RoutingTables) MarshalEasyJSON(w *jwriter.Writer)
- func (v RoutingTables) MarshalJSON() ([]byte, error)
- func (obj *RoutingTables) MatchBool(key string, predicate getter.BoolPredicate) bool
- func (obj *RoutingTables) MatchInt64(key string, predicate getter.Int64Predicate) bool
- func (obj *RoutingTables) MatchString(key string, predicate getter.StringPredicate) bool
- func (v *RoutingTables) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *RoutingTables) UnmarshalJSON(data []byte) error
- type TIDMapper
- func (t *TIDMapper) OnEdgeAdded(e *graph.Edge)
- func (t *TIDMapper) OnEdgeDeleted(e *graph.Edge)
- func (t *TIDMapper) OnEdgeUpdated(e *graph.Edge, ops []graph.PartiallyUpdatedOp)
- func (t *TIDMapper) OnNodeAdded(n *graph.Node)
- func (t *TIDMapper) OnNodeUpdated(n *graph.Node, ops []graph.PartiallyUpdatedOp)
- func (t *TIDMapper) Start()
- func (t *TIDMapper) Stop()
Constants ¶
const ( OwnershipLink = "ownership" Layer2Link = "layer2" )
ErrNetworkPathNotFound
Variables ¶
var ( // IPv4DefaultRoute default IPv4 route IPv4DefaultRoute = net.IPNet{IP: net.IPv4zero, Mask: net.CIDRMask(0, 8*net.IPv4len)} // IPv6DefaultRoute default IPv6 route IPv6DefaultRoute = net.IPNet{IP: net.IPv6zero, Mask: net.CIDRMask(0, 8*net.IPv6len)} )
var ErrNoNextHop = errors.New("no next hop")
ErrNoNextHop is returned when no next hop could be determined
var ( // ErrNoPathToHost is called when no host could be found as the parent of a node ErrNoPathToHost = func(name string) error { return fmt.Errorf("Failed to determine network namespace path for %s", name) } )
var SchemaValidator *schema.JSONValidator
SchemaValidator is the global validator for Skydive resources
Functions ¶
func AddLayer2Link ¶ added in v0.11.0
func AddLayer2Link(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, metadata graph.Metadata) (*graph.Edge, error)
AddLayer2Link links the parent and the child node
func AddLink ¶ added in v0.22.0
func AddLink(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, relationType string, metadata graph.Metadata) (*graph.Edge, error)
AddLink links the parent and the child node with the specified relation type and metadata
func AddOwnershipLink ¶ added in v0.11.0
func AddOwnershipLink(g *graph.Graph, parent *graph.Node, child *graph.Node, metadata graph.Metadata) (*graph.Edge, error)
AddOwnershipLink Link between the parent and the child node, the child can have only one parent, previous will be overwritten
func ContainerMetadataDecoder ¶ added in v0.28.0
func ContainerMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
ContainerMetadataDecoder implements a json message raw decoder
func GetOwnershipLink ¶ added in v0.17.0
GetOwnershipLink get ownership Link between the parent and the child node or nil
func HaveLayer2Link ¶ added in v0.11.0
HaveLayer2Link returns true if parent and child have the same layer 2
func HaveOwnershipLink ¶ added in v0.11.0
HaveOwnershipLink returns true if parent and child have an ownership link
func InterfaceMetricMetadataDecoder ¶ added in v0.21.0
func InterfaceMetricMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
InterfaceMetricMetadataDecoder implements a json message raw decoder
func IsInterfaceUp ¶ added in v0.21.0
IsInterfaceUp returns whether an interface has the flag UP set
func IsOwnershipLinked ¶ added in v0.13.0
IsOwnershipLinked checks whether the node has an OwnershipLink
func Layer2Metadata ¶ added in v0.11.0
Layer2Metadata returns metadata for a layer2 link
func NamespaceFromNode ¶ added in v0.12.0
NamespaceFromNode returns the namespace name and the path of a node in the graph
func NeighborMetadataDecoder ¶ added in v0.24.0
func NeighborMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
NeighborMetadataDecoder implements a json message raw decoder
func NewLink ¶ added in v0.23.0
func NewLink(g *graph.Graph, node1 *graph.Node, node2 *graph.Node, relationType string, metadata graph.Metadata) (*graph.Edge, error)
NewLink creates a link between a parent and a child node with the specified relation type and metadata
func NewNetNSContextByNode ¶ added in v0.8.0
NewNetNSContextByNode creates a new network namespace context based on the node
func OwnershipMetadata ¶ added in v0.11.0
OwnershipMetadata returns metadata for an ownership link
func RegisterContainer ¶ added in v0.28.0
func RegisterContainer()
RegisterContainer registers container metadata decoder
func RoutingTablesMetadataDecoder ¶ added in v0.24.0
func RoutingTablesMetadataDecoder(raw json.RawMessage) (getter.Getter, error)
RoutingTablesMetadataDecoder implements a json message raw decoder
Types ¶
type ContainerMetadata ¶ added in v0.28.0
type ContainerMetadata struct { ID string Image string `json:",omitempty"` ImageID string `json:",omitempty"` Runtime string Status string InitProcessPID int64 Hosts Hosts `json:",omitempty"` Labels graph.Metadata `json:",omitempty" field:"Metadata"` }
ContainerMetadata describe the metadata of a docker container easyjson:json gendecoder
func (*ContainerMetadata) GetField ¶ added in v0.28.0
func (obj *ContainerMetadata) GetField(key string) (interface{}, error)
func (*ContainerMetadata) GetFieldBool ¶ added in v0.28.0
func (obj *ContainerMetadata) GetFieldBool(key string) (bool, error)
func (*ContainerMetadata) GetFieldInt64 ¶ added in v0.28.0
func (obj *ContainerMetadata) GetFieldInt64(key string) (int64, error)
func (*ContainerMetadata) GetFieldKeys ¶ added in v0.28.0
func (obj *ContainerMetadata) GetFieldKeys() []string
func (*ContainerMetadata) GetFieldString ¶ added in v0.28.0
func (obj *ContainerMetadata) GetFieldString(key string) (string, error)
func (ContainerMetadata) MarshalEasyJSON ¶ added in v0.28.0
func (v ContainerMetadata) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ContainerMetadata) MarshalJSON ¶ added in v0.28.0
func (v ContainerMetadata) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ContainerMetadata) MatchBool ¶ added in v0.28.0
func (obj *ContainerMetadata) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*ContainerMetadata) MatchInt64 ¶ added in v0.28.0
func (obj *ContainerMetadata) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*ContainerMetadata) MatchString ¶ added in v0.28.0
func (obj *ContainerMetadata) MatchString(key string, predicate getter.StringPredicate) bool
func (*ContainerMetadata) UnmarshalEasyJSON ¶ added in v0.28.0
func (v *ContainerMetadata) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ContainerMetadata) UnmarshalJSON ¶ added in v0.28.0
func (v *ContainerMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type HostNodeTIDMap ¶ added in v0.9.0
HostNodeTIDMap a map that store the value node TID and the key node host
func BuildHostNodeTIDMap ¶ added in v0.9.0
func BuildHostNodeTIDMap(nodes []*graph.Node) HostNodeTIDMap
BuildHostNodeTIDMap creates a new node and host (key) map
type Hosts ¶ added in v0.28.0
type Hosts struct { IP string `json:",omitempty"` Hostname string `json:",omitempty"` ByIP graph.Metadata `json:",omitempty" field:"Metadata"` }
Hosts describes a /etc/hosts file easyjson:json gendecoder
func (*Hosts) GetFieldBool ¶ added in v0.28.0
func (*Hosts) GetFieldInt64 ¶ added in v0.28.0
func (*Hosts) GetFieldKeys ¶ added in v0.28.0
func (*Hosts) GetFieldString ¶ added in v0.28.0
func (Hosts) MarshalEasyJSON ¶ added in v0.28.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Hosts) MarshalJSON ¶ added in v0.28.0
MarshalJSON supports json.Marshaler interface
func (*Hosts) MatchBool ¶ added in v0.28.0
func (obj *Hosts) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*Hosts) MatchInt64 ¶ added in v0.28.0
func (obj *Hosts) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*Hosts) MatchString ¶ added in v0.28.0
func (obj *Hosts) MatchString(key string, predicate getter.StringPredicate) bool
func (*Hosts) UnmarshalEasyJSON ¶ added in v0.28.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Hosts) UnmarshalJSON ¶ added in v0.28.0
UnmarshalJSON supports json.Unmarshaler interface
type InterfaceMetric ¶ added in v0.16.0
type InterfaceMetric struct { Collisions int64 `json:"Collisions,omitempty"` Multicast int64 `json:"Multicast,omitempty"` RxBytes int64 `json:"RxBytes,omitempty"` RxCompressed int64 `json:"RxCompressed,omitempty"` RxCrcErrors int64 `json:"RxCrcErrors,omitempty"` RxDropped int64 `json:"RxDropped,omitempty"` RxErrors int64 `json:"RxErrors,omitempty"` RxFifoErrors int64 `json:"RxFifoErrors,omitempty"` RxFrameErrors int64 `json:"RxFrameErrors,omitempty"` RxLengthErrors int64 `json:"RxLengthErrors,omitempty"` RxMissedErrors int64 `json:"RxMissedErrors,omitempty"` RxOverErrors int64 `json:"RxOverErrors,omitempty"` RxPackets int64 `json:"RxPackets,omitempty"` TxAbortedErrors int64 `json:"TxAbortedErrors,omitempty"` TxBytes int64 `json:"TxBytes,omitempty"` TxCarrierErrors int64 `json:"TxCarrierErrors,omitempty"` TxCompressed int64 `json:"TxCompressed,omitempty"` TxDropped int64 `json:"TxDropped,omitempty"` TxErrors int64 `json:"TxErrors,omitempty"` TxFifoErrors int64 `json:"TxFifoErrors,omitempty"` TxHeartbeatErrors int64 `json:"TxHeartbeatErrors,omitempty"` TxPackets int64 `json:"TxPackets,omitempty"` TxWindowErrors int64 `json:"TxWindowErrors,omitempty"` Start int64 `json:"Start,omitempty"` Last int64 `json:"Last,omitempty"` }
InterfaceMetric the interface packets counters easyjson:json gendecoder
func (*InterfaceMetric) Add ¶ added in v0.16.0
func (im *InterfaceMetric) Add(m common.Metric) common.Metric
Add sum two metrics and return a new Metrics object
func (*InterfaceMetric) GetField ¶ added in v0.21.0
func (obj *InterfaceMetric) GetField(key string) (interface{}, error)
func (*InterfaceMetric) GetFieldBool ¶ added in v0.26.0
func (obj *InterfaceMetric) GetFieldBool(key string) (bool, error)
func (*InterfaceMetric) GetFieldInt64 ¶ added in v0.16.0
func (obj *InterfaceMetric) GetFieldInt64(key string) (int64, error)
func (*InterfaceMetric) GetFieldKeys ¶ added in v0.21.0
func (obj *InterfaceMetric) GetFieldKeys() []string
func (*InterfaceMetric) GetFieldString ¶ added in v0.21.0
func (obj *InterfaceMetric) GetFieldString(key string) (string, error)
func (*InterfaceMetric) GetLast ¶ added in v0.16.0
func (im *InterfaceMetric) GetLast() int64
GetLast returns last time
func (*InterfaceMetric) GetStart ¶ added in v0.16.0
func (im *InterfaceMetric) GetStart() int64
GetStart returns start time
func (*InterfaceMetric) IsZero ¶ added in v0.16.0
func (im *InterfaceMetric) IsZero() bool
IsZero returns true if all the values are equal to zero
func (InterfaceMetric) MarshalEasyJSON ¶ added in v0.26.0
func (v InterfaceMetric) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (InterfaceMetric) MarshalJSON ¶ added in v0.26.0
func (v InterfaceMetric) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*InterfaceMetric) MatchBool ¶ added in v0.26.0
func (obj *InterfaceMetric) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*InterfaceMetric) MatchInt64 ¶ added in v0.26.0
func (obj *InterfaceMetric) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*InterfaceMetric) MatchString ¶ added in v0.26.0
func (obj *InterfaceMetric) MatchString(key string, predicate getter.StringPredicate) bool
func (*InterfaceMetric) SetLast ¶ added in v0.16.0
func (im *InterfaceMetric) SetLast(last int64)
SetLast set last tome
func (*InterfaceMetric) SetStart ¶ added in v0.16.0
func (im *InterfaceMetric) SetStart(start int64)
SetStart set start time
func (*InterfaceMetric) Sub ¶ added in v0.16.0
func (im *InterfaceMetric) Sub(m common.Metric) common.Metric
Sub subtracts two metrics and return a new metrics object
func (*InterfaceMetric) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *InterfaceMetric) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*InterfaceMetric) UnmarshalJSON ¶ added in v0.26.0
func (v *InterfaceMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Neighbor ¶ added in v0.24.0
type Neighbor struct { Flags []string `json:"Flags,omitempty"` MAC string `json:"MAC,omitempty"` IP net.IP `json:"IP,omitempty"` State []string `json:"State,omitempty"` Vlan int64 `json:"Vlan,omitempty"` VNI int64 `json:"VNI,omitempty"` IfIndex int64 }
Neighbor describes a member of the forwarding database easyjson:json gendecoder
func (*Neighbor) GetFieldBool ¶ added in v0.26.0
func (*Neighbor) GetFieldInt64 ¶ added in v0.26.0
func (*Neighbor) GetFieldKeys ¶ added in v0.26.0
func (*Neighbor) GetFieldString ¶ added in v0.26.0
func (Neighbor) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Neighbor) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Neighbor) MatchBool ¶ added in v0.26.0
func (obj *Neighbor) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*Neighbor) MatchInt64 ¶ added in v0.26.0
func (obj *Neighbor) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*Neighbor) MatchString ¶ added in v0.26.0
func (obj *Neighbor) MatchString(key string, predicate getter.StringPredicate) bool
func (*Neighbor) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Neighbor) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type Neighbors ¶ added in v0.24.0
type Neighbors []*Neighbor
Neighbors describes a list of neighbors easyjson:json gendecoder
func (*Neighbors) GetFieldBool ¶ added in v0.26.0
func (*Neighbors) GetFieldInt64 ¶ added in v0.26.0
func (*Neighbors) GetFieldKeys ¶ added in v0.26.0
func (*Neighbors) GetFieldString ¶ added in v0.26.0
func (Neighbors) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Neighbors) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Neighbors) MatchBool ¶ added in v0.26.0
func (obj *Neighbors) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*Neighbors) MatchInt64 ¶ added in v0.26.0
func (obj *Neighbors) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*Neighbors) MatchString ¶ added in v0.26.0
func (obj *Neighbors) MatchString(key string, predicate getter.StringPredicate) bool
func (*Neighbors) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Neighbors) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type NextHop ¶ added in v0.24.0
type NextHop struct { Priority int64 `json:"Priority"` IP net.IP `json:"IP,omitempty"` MAC string `json:"MAC,omitempty"` IfIndex int64 `json:"IfIndex"` }
NextHop describes a next hop easyjson:json gendecoder
func GetNextHop ¶ added in v0.24.0
GetNextHop returns the next hop to reach a specified IP
func (*NextHop) GetFieldBool ¶ added in v0.26.0
func (*NextHop) GetFieldInt64 ¶ added in v0.26.0
func (*NextHop) GetFieldKeys ¶ added in v0.26.0
func (*NextHop) GetFieldString ¶ added in v0.26.0
func (NextHop) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (NextHop) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*NextHop) MatchBool ¶ added in v0.26.0
func (obj *NextHop) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*NextHop) MatchInt64 ¶ added in v0.26.0
func (obj *NextHop) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*NextHop) MatchString ¶ added in v0.26.0
func (obj *NextHop) MatchString(key string, predicate getter.StringPredicate) bool
func (*NextHop) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NextHop) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type Prefix ¶ added in v0.24.0
Prefix describes prefix
func (*Prefix) IsDefaultRoute ¶ added in v0.24.0
IsDefaultRoute return whether the given cidr is a default route
func (*Prefix) MarshalJSON ¶ added in v0.24.0
MarshalJSON custom marshal function
func (*Prefix) UnmarshalJSON ¶ added in v0.24.0
UnmarshalJSON custom unmarshal function
type Route ¶ added in v0.24.0
type Route struct { Protocol int64 `json:"Protocol"` Prefix Prefix `json:"Prefix"` NextHops []*NextHop `json:"NextHops"` }
Route describes a route easyjson:json gendecoder
func (*Route) GetFieldBool ¶ added in v0.26.0
func (*Route) GetFieldInt64 ¶ added in v0.26.0
func (*Route) GetFieldKeys ¶ added in v0.26.0
func (*Route) GetFieldString ¶ added in v0.26.0
func (*Route) GetNextHop ¶ added in v0.24.0
GetNextHop returns the nexthop for the given ip and ifindex
func (*Route) GetOrCreateNextHop ¶ added in v0.24.0
GetOrCreateNextHop creates if not existing a new nexthop and returns it
func (Route) MarshalEasyJSON ¶ added in v0.26.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (Route) MarshalJSON ¶ added in v0.26.0
MarshalJSON supports json.Marshaler interface
func (*Route) MatchBool ¶ added in v0.26.0
func (obj *Route) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*Route) MatchInt64 ¶ added in v0.26.0
func (obj *Route) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*Route) MatchString ¶ added in v0.26.0
func (obj *Route) MatchString(key string, predicate getter.StringPredicate) bool
func (*Route) UnmarshalEasyJSON ¶ added in v0.26.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Route) UnmarshalJSON ¶ added in v0.26.0
UnmarshalJSON supports json.Unmarshaler interface
type RoutingTable ¶ added in v0.24.0
type RoutingTable struct { ID int64 `json:"ID"` Src net.IP `json:"Src"` Routes []*Route `json:"Routes"` }
RoutingTable describes a list of Routes easyjson:json gendecoder
func (*RoutingTable) GetField ¶ added in v0.26.0
func (obj *RoutingTable) GetField(key string) (interface{}, error)
func (*RoutingTable) GetFieldBool ¶ added in v0.26.0
func (obj *RoutingTable) GetFieldBool(key string) (bool, error)
func (*RoutingTable) GetFieldInt64 ¶ added in v0.26.0
func (obj *RoutingTable) GetFieldInt64(key string) (int64, error)
func (*RoutingTable) GetFieldKeys ¶ added in v0.26.0
func (obj *RoutingTable) GetFieldKeys() []string
func (*RoutingTable) GetFieldString ¶ added in v0.26.0
func (obj *RoutingTable) GetFieldString(key string) (string, error)
func (*RoutingTable) GetOrCreateRoute ¶ added in v0.24.0
func (rt *RoutingTable) GetOrCreateRoute(protocol int64, prefix net.IPNet) *Route
GetOrCreateRoute creates if not existing a new route and returns it
func (*RoutingTable) GetRoute ¶ added in v0.24.0
func (rt *RoutingTable) GetRoute(protocol int64, prefix net.IPNet) *Route
GetRoute returns route for the given protocol and prefix
func (RoutingTable) MarshalEasyJSON ¶ added in v0.26.0
func (v RoutingTable) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RoutingTable) MarshalJSON ¶ added in v0.26.0
func (v RoutingTable) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RoutingTable) MatchBool ¶ added in v0.26.0
func (obj *RoutingTable) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*RoutingTable) MatchInt64 ¶ added in v0.26.0
func (obj *RoutingTable) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*RoutingTable) MatchString ¶ added in v0.26.0
func (obj *RoutingTable) MatchString(key string, predicate getter.StringPredicate) bool
func (*RoutingTable) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *RoutingTable) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RoutingTable) UnmarshalJSON ¶ added in v0.26.0
func (v *RoutingTable) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RoutingTables ¶ added in v0.24.0
type RoutingTables []*RoutingTable
RoutingTables describes a list of routing table easyjson:json gendecoder
func (*RoutingTables) GetField ¶ added in v0.26.0
func (obj *RoutingTables) GetField(key string) (interface{}, error)
func (*RoutingTables) GetFieldBool ¶ added in v0.26.0
func (obj *RoutingTables) GetFieldBool(key string) (bool, error)
func (*RoutingTables) GetFieldInt64 ¶ added in v0.26.0
func (obj *RoutingTables) GetFieldInt64(key string) (int64, error)
func (*RoutingTables) GetFieldKeys ¶ added in v0.26.0
func (obj *RoutingTables) GetFieldKeys() []string
func (*RoutingTables) GetFieldString ¶ added in v0.26.0
func (obj *RoutingTables) GetFieldString(key string) (string, error)
func (RoutingTables) MarshalEasyJSON ¶ added in v0.26.0
func (v RoutingTables) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RoutingTables) MarshalJSON ¶ added in v0.26.0
func (v RoutingTables) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RoutingTables) MatchBool ¶ added in v0.26.0
func (obj *RoutingTables) MatchBool(key string, predicate getter.BoolPredicate) bool
func (*RoutingTables) MatchInt64 ¶ added in v0.26.0
func (obj *RoutingTables) MatchInt64(key string, predicate getter.Int64Predicate) bool
func (*RoutingTables) MatchString ¶ added in v0.26.0
func (obj *RoutingTables) MatchString(key string, predicate getter.StringPredicate) bool
func (*RoutingTables) UnmarshalEasyJSON ¶ added in v0.26.0
func (v *RoutingTables) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RoutingTables) UnmarshalJSON ¶ added in v0.26.0
func (v *RoutingTables) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type TIDMapper ¶ added in v0.6.0
type TIDMapper struct { graph.DefaultGraphListener Graph *graph.Graph // contains filtered or unexported fields }
TIDMapper describes the hostID nodes stored in a graph the mapper will broadcast node event to the registered listeners
func NewTIDMapper ¶ added in v0.6.0
NewTIDMapper creates a new node mapper in the graph g
func (*TIDMapper) OnEdgeAdded ¶ added in v0.6.0
OnEdgeAdded event
func (*TIDMapper) OnEdgeDeleted ¶ added in v0.11.0
OnEdgeDeleted event
func (*TIDMapper) OnEdgeUpdated ¶ added in v0.6.0
func (t *TIDMapper) OnEdgeUpdated(e *graph.Edge, ops []graph.PartiallyUpdatedOp)
OnEdgeUpdated event
func (*TIDMapper) OnNodeAdded ¶ added in v0.6.0
OnNodeAdded evetn
func (*TIDMapper) OnNodeUpdated ¶ added in v0.6.0
func (t *TIDMapper) OnNodeUpdated(n *graph.Node, ops []graph.PartiallyUpdatedOp)
OnNodeUpdated event
Source Files ¶
- container.go
- container_easyjson.go
- container_gendecoder.go
- metrics.go
- metrics_easyjson.go
- metrics_gendecoder.go
- neighbors.go
- neighbors_easyjson.go
- neighbors_gendecoder.go
- nexthop.go
- nexthop_easyjson.go
- nexthop_gendecoder.go
- routes.go
- routes_easyjson.go
- routes_gendecoder.go
- tid.go
- topology.go
- validator.go
Directories ¶
Path | Synopsis |
---|---|
ovnk8s
* Copyright (C) 2019 Red Hat, Inc.
|
* Copyright (C) 2019 Red Hat, Inc. |
vpp/bin_api/interfaces
Package interfaces is a generated from VPP binary API module 'interface'.
|
Package interfaces is a generated from VPP binary API module 'interface'. |
vpp/bin_api/vpe
Package vpe is a generated from VPP binary API module 'vpe'.
|
Package vpe is a generated from VPP binary API module 'vpe'. |