Documentation
¶
Overview ¶
Package flow is a generated protocol buffer package.
It is generated from these files:
flow/flow.proto
It has these top-level messages:
FlowEndpointStatistics FlowEndpointsStatistics FlowStatistics Flow
Index ¶
- Variables
- func LayerFlow(l gopacket.Layer) gopacket.Flow
- func Var8bin(v []byte) []byte
- type ExpireUpdateFunc
- type Flow
- func FlowFromGoPacket(ft *FlowTable, packet *gopacket.Packet, setter FlowProbePathSetter) *Flow
- func FlowsFromSFlowSample(ft *FlowTable, sample *layers.SFlowFlowSample, setter FlowProbePathSetter) []*Flow
- func FromData(data []byte) (*Flow, error)
- func GenerateTestFlows(t *testing.T, ft *FlowTable, baseSeed int64, probePath string) []*Flow
- func GenerateTestFlowsSymmetric(t *testing.T, ft *FlowTable, baseSeed int64, probePath string) []*Flow
- type FlowEndpointLayer
- type FlowEndpointStatistics
- type FlowEndpointType
- type FlowEndpointsStatistics
- func (*FlowEndpointsStatistics) Descriptor() ([]byte, []int)
- func (m *FlowEndpointsStatistics) GetAB() *FlowEndpointStatistics
- func (m *FlowEndpointsStatistics) GetBA() *FlowEndpointStatistics
- func (s *FlowEndpointsStatistics) MarshalJSON() ([]byte, error)
- func (*FlowEndpointsStatistics) ProtoMessage()
- func (m *FlowEndpointsStatistics) Reset()
- func (m *FlowEndpointsStatistics) String() string
- func (s *FlowEndpointsStatistics) UnmarshalJSON(b []byte) error
- type FlowKey
- type FlowProbePathSetter
- type FlowStatistics
- func (*FlowStatistics) Descriptor() ([]byte, []int)
- func (fs *FlowStatistics) DumpInfo(layerSeparator ...string) string
- func (m *FlowStatistics) GetEndpoints() []*FlowEndpointsStatistics
- func (fs *FlowStatistics) GetEndpointsType(eptype FlowEndpointType) *FlowEndpointsStatistics
- func (*FlowStatistics) ProtoMessage()
- func (m *FlowStatistics) Reset()
- func (m *FlowStatistics) String() string
- func (fs *FlowStatistics) Update(packet *gopacket.Packet)
- type FlowTable
- func (ft *FlowTable) Expire(now time.Time)
- func (ft *FlowTable) ExpireNow()
- func (ft *FlowTable) FilterLast(last time.Duration) []*Flow
- func (ft *FlowTable) GetExpireTicker() <-chan time.Time
- func (ft *FlowTable) GetFlow(key string) *Flow
- func (ft *FlowTable) GetFlows() []*Flow
- func (ft *FlowTable) GetOrCreateFlow(key string) (*Flow, bool)
- func (ft *FlowTable) GetUpdatedTicker() <-chan time.Time
- func (ft *FlowTable) LookupFlowsByProbePath(p string) []*Flow
- func (ft *FlowTable) RegisterExpire(fn ExpireUpdateFunc, every time.Duration)
- func (ft *FlowTable) RegisterUpdated(fn ExpireUpdateFunc, since time.Duration)
- func (ft *FlowTable) SelectLayer(endpointType FlowEndpointType, list []string) []*Flow
- func (ft *FlowTable) String() string
- func (ft *FlowTable) UnregisterAll()
- func (ft *FlowTable) Update(flows []*Flow)
- func (ft *FlowTable) Updated(now time.Time)
- type FlowTableManager
- type FlowTableManagerAsync
- type FlowTableManagerAsyncFunction
- type FlowTableManagerAsyncParam
- type ProtocolType
Constants ¶
This section is empty.
Variables ¶
View Source
var FlowEndpointLayer_name = map[int32]string{
0: "LINK",
1: "NETWORK",
2: "TRANSPORT",
}
View Source
var FlowEndpointLayer_value = map[string]int32{
"LINK": 0,
"NETWORK": 1,
"TRANSPORT": 2,
}
View Source
var FlowEndpointType_name = map[int32]string{
0: "ETHERNET",
1: "IPV4",
2: "TCPPORT",
3: "UDPPORT",
4: "SCTPPORT",
}
View Source
var FlowEndpointType_value = map[string]int32{
"ETHERNET": 0,
"IPV4": 1,
"TCPPORT": 2,
"UDPPORT": 3,
"SCTPPORT": 4,
}
Functions ¶
Types ¶
type ExpireUpdateFunc ¶ added in v0.3.0
type ExpireUpdateFunc func(f []*Flow)
type Flow ¶
type Flow struct {
UUID string `protobuf:"bytes,1,opt,name=UUID" json:"UUID,omitempty"`
LayersPath string `protobuf:"bytes,2,opt,name=LayersPath" json:"LayersPath,omitempty"`
// Data Flow info
Statistics *FlowStatistics `protobuf:"bytes,3,opt,name=Statistics" json:"Statistics,omitempty"`
FlowUUID string `protobuf:"bytes,5,opt,name=FlowUUID" json:"FlowUUID,omitempty"`
// Topology info
ProbeGraphPath string `protobuf:"bytes,11,opt,name=ProbeGraphPath" json:"ProbeGraphPath,omitempty"`
IfSrcGraphPath string `protobuf:"bytes,14,opt,name=IfSrcGraphPath" json:"IfSrcGraphPath,omitempty"`
IfDstGraphPath string `protobuf:"bytes,19,opt,name=IfDstGraphPath" json:"IfDstGraphPath,omitempty"`
}
func FlowFromGoPacket ¶ added in v0.3.0
func FlowFromGoPacket(ft *FlowTable, packet *gopacket.Packet, setter FlowProbePathSetter) *Flow
func FlowsFromSFlowSample ¶ added in v0.3.0
func FlowsFromSFlowSample(ft *FlowTable, sample *layers.SFlowFlowSample, setter FlowProbePathSetter) []*Flow
func GenerateTestFlows ¶ added in v0.3.0
func GenerateTestFlowsSymmetric ¶ added in v0.3.0
func (*Flow) Descriptor ¶
func (*Flow) GetStatistics ¶
func (m *Flow) GetStatistics() *FlowStatistics
func (*Flow) ProtoMessage ¶
func (*Flow) ProtoMessage()
type FlowEndpointLayer ¶ added in v0.3.0
type FlowEndpointLayer int32
const ( FlowEndpointLayer_LINK FlowEndpointLayer = 0 FlowEndpointLayer_NETWORK FlowEndpointLayer = 1 FlowEndpointLayer_TRANSPORT FlowEndpointLayer = 2 )
func (FlowEndpointLayer) EnumDescriptor ¶ added in v0.3.0
func (FlowEndpointLayer) EnumDescriptor() ([]byte, []int)
func (FlowEndpointLayer) String ¶ added in v0.3.0
func (x FlowEndpointLayer) String() string
type FlowEndpointStatistics ¶
type FlowEndpointStatistics struct {
Value string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"`
Packets uint64 `protobuf:"varint,5,opt,name=Packets" json:"Packets,omitempty"`
Bytes uint64 `protobuf:"varint,6,opt,name=Bytes" json:"Bytes,omitempty"`
}
func (*FlowEndpointStatistics) Descriptor ¶
func (*FlowEndpointStatistics) Descriptor() ([]byte, []int)
func (*FlowEndpointStatistics) ProtoMessage ¶
func (*FlowEndpointStatistics) ProtoMessage()
func (*FlowEndpointStatistics) Reset ¶
func (m *FlowEndpointStatistics) Reset()
func (*FlowEndpointStatistics) String ¶
func (m *FlowEndpointStatistics) String() string
type FlowEndpointType ¶
type FlowEndpointType int32
const ( FlowEndpointType_ETHERNET FlowEndpointType = 0 FlowEndpointType_IPV4 FlowEndpointType = 1 FlowEndpointType_TCPPORT FlowEndpointType = 2 FlowEndpointType_UDPPORT FlowEndpointType = 3 FlowEndpointType_SCTPPORT FlowEndpointType = 4 )
func (FlowEndpointType) EnumDescriptor ¶
func (FlowEndpointType) EnumDescriptor() ([]byte, []int)
func (FlowEndpointType) String ¶
func (x FlowEndpointType) String() string
func (FlowEndpointType) Value ¶
func (x FlowEndpointType) Value() int32
type FlowEndpointsStatistics ¶
type FlowEndpointsStatistics struct {
Type FlowEndpointType `protobuf:"varint,1,opt,name=Type,enum=flow.FlowEndpointType" json:"Type,omitempty"`
Hash []byte `protobuf:"bytes,2,opt,name=Hash,proto3" json:"Hash,omitempty"`
AB *FlowEndpointStatistics `protobuf:"bytes,3,opt,name=AB" json:"AB,omitempty"`
BA *FlowEndpointStatistics `protobuf:"bytes,4,opt,name=BA" json:"BA,omitempty"`
}
func (*FlowEndpointsStatistics) Descriptor ¶
func (*FlowEndpointsStatistics) Descriptor() ([]byte, []int)
func (*FlowEndpointsStatistics) GetAB ¶
func (m *FlowEndpointsStatistics) GetAB() *FlowEndpointStatistics
func (*FlowEndpointsStatistics) GetBA ¶
func (m *FlowEndpointsStatistics) GetBA() *FlowEndpointStatistics
func (*FlowEndpointsStatistics) MarshalJSON ¶ added in v0.2.0
func (s *FlowEndpointsStatistics) MarshalJSON() ([]byte, error)
func (*FlowEndpointsStatistics) ProtoMessage ¶
func (*FlowEndpointsStatistics) ProtoMessage()
func (*FlowEndpointsStatistics) Reset ¶
func (m *FlowEndpointsStatistics) Reset()
func (*FlowEndpointsStatistics) String ¶
func (m *FlowEndpointsStatistics) String() string
func (*FlowEndpointsStatistics) UnmarshalJSON ¶ added in v0.2.0
func (s *FlowEndpointsStatistics) UnmarshalJSON(b []byte) error
type FlowKey ¶
type FlowKey struct {
// contains filtered or unexported fields
}
func NewFlowKeyFromGoPacket ¶ added in v0.3.0
type FlowProbePathSetter ¶ added in v0.3.0
type FlowStatistics ¶
type FlowStatistics struct {
Start int64 `protobuf:"varint,1,opt,name=Start" json:"Start,omitempty"`
Last int64 `protobuf:"varint,2,opt,name=Last" json:"Last,omitempty"`
Endpoints []*FlowEndpointsStatistics `protobuf:"bytes,3,rep,name=Endpoints" json:"Endpoints,omitempty"`
}
func NewFlowStatistics ¶
func NewFlowStatistics(packet *gopacket.Packet) *FlowStatistics
func (*FlowStatistics) Descriptor ¶
func (*FlowStatistics) Descriptor() ([]byte, []int)
func (*FlowStatistics) DumpInfo ¶ added in v0.3.0
func (fs *FlowStatistics) DumpInfo(layerSeparator ...string) string
func (*FlowStatistics) GetEndpoints ¶
func (m *FlowStatistics) GetEndpoints() []*FlowEndpointsStatistics
func (*FlowStatistics) GetEndpointsType ¶ added in v0.3.0
func (fs *FlowStatistics) GetEndpointsType(eptype FlowEndpointType) *FlowEndpointsStatistics
func (*FlowStatistics) ProtoMessage ¶
func (*FlowStatistics) ProtoMessage()
func (*FlowStatistics) Reset ¶
func (m *FlowStatistics) Reset()
func (*FlowStatistics) String ¶
func (m *FlowStatistics) String() string
func (*FlowStatistics) Update ¶ added in v0.3.0
func (fs *FlowStatistics) Update(packet *gopacket.Packet)
type FlowTable ¶
type FlowTable struct {
// contains filtered or unexported fields
}
func NewFlowTable ¶
func NewFlowTable() *FlowTable
func NewFlowTableComplex ¶ added in v0.3.0
func NewFlowTableFromFlows ¶ added in v0.3.0
func NewTestFlowTableSimple ¶ added in v0.3.0
func (*FlowTable) FilterLast ¶
Return a new FlowTable that contain <last> active flows
func (*FlowTable) GetExpireTicker ¶ added in v0.3.0
func (*FlowTable) GetOrCreateFlow ¶ added in v0.3.0
func (*FlowTable) GetUpdatedTicker ¶ added in v0.3.0
func (*FlowTable) LookupFlowsByProbePath ¶ added in v0.3.0
func (*FlowTable) RegisterExpire ¶ added in v0.3.0
func (ft *FlowTable) RegisterExpire(fn ExpireUpdateFunc, every time.Duration)
Asynchrnously Register an expire callback fn with last updated flow 'since', each 'since' tick
func (*FlowTable) RegisterUpdated ¶ added in v0.3.0
func (ft *FlowTable) RegisterUpdated(fn ExpireUpdateFunc, since time.Duration)
Asynchrnously call the callback fn with last updated flow 'since', each 'since' tick
func (*FlowTable) SelectLayer ¶ added in v0.2.0
func (ft *FlowTable) SelectLayer(endpointType FlowEndpointType, list []string) []*Flow
func (*FlowTable) UnregisterAll ¶ added in v0.3.0
func (ft *FlowTable) UnregisterAll()
type FlowTableManager ¶ added in v0.3.0
type FlowTableManager struct {
// contains filtered or unexported fields
}
type FlowTableManagerAsync ¶ added in v0.3.0
type FlowTableManagerAsync struct {
FlowTableManagerAsyncParam
// contains filtered or unexported fields
}
func (*FlowTableManagerAsync) Register ¶ added in v0.3.0
func (ftma *FlowTableManagerAsync) Register(p *FlowTableManagerAsyncParam)
func (*FlowTableManagerAsync) Unregister ¶ added in v0.3.0
func (ftma *FlowTableManagerAsync) Unregister()
type FlowTableManagerAsyncFunction ¶ added in v0.3.0
type FlowTableManagerAsyncFunction func(fn ExpireUpdateFunc, updateFrom int64)
type FlowTableManagerAsyncParam ¶ added in v0.3.0
type FlowTableManagerAsyncParam struct {
// contains filtered or unexported fields
}
type ProtocolType ¶ added in v0.3.0
type ProtocolType int
const ( ETH ProtocolType = 1 + iota IPv4 IPv6 TCP UDP )
Click to show internal directories.
Click to hide internal directories.