 Documentation
      ¶
      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,
}
    Functions ¶
Types ¶
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 ¶
func FlowFromGoPacket(ft *FlowTable, packet *gopacket.Packet, setter FlowProbePathSetter) *Flow
func FlowsFromSFlowSample ¶
func FlowsFromSFlowSample(ft *FlowTable, sample *layers.SFlowFlowSample, setter FlowProbePathSetter) []*Flow
func GenerateTestFlows ¶
func GenerateTestFlowsSymmetric ¶
func (*Flow) GetStatistics ¶
func (m *Flow) GetStatistics() *FlowStatistics
type FlowEndpointLayer ¶
type FlowEndpointLayer int32
const ( FlowEndpointLayer_LINK FlowEndpointLayer = 0 FlowEndpointLayer_NETWORK FlowEndpointLayer = 1 FlowEndpointLayer_TRANSPORT FlowEndpointLayer = 2 )
func (FlowEndpointLayer) EnumDescriptor ¶
func (FlowEndpointLayer) EnumDescriptor() ([]byte, []int)
func (FlowEndpointLayer) String ¶
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 ¶
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 ¶
func (s *FlowEndpointsStatistics) UnmarshalJSON(b []byte) error
type FlowKey ¶
type FlowKey struct {
	// contains filtered or unexported fields
}
    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 ¶
func (fs *FlowStatistics) DumpInfo(layerSeparator ...string) string
func (*FlowStatistics) GetEndpoints ¶
func (m *FlowStatistics) GetEndpoints() []*FlowEndpointsStatistics
func (*FlowStatistics) GetEndpointsType ¶
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 ¶
func (fs *FlowStatistics) Update(packet *gopacket.Packet)
type FlowTable ¶
type FlowTable struct {
	// contains filtered or unexported fields
}
    func (*FlowTable) Expire ¶
* Following function are FlowTable manager helpers
func (*FlowTable) FilterLast ¶
Return a new FlowTable that contain <last> active flows
func (*FlowTable) LookupFlowsByProbePath ¶
func (*FlowTable) RegisterExpire ¶
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 ¶
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 ¶
func (ft *FlowTable) SelectLayer(endpointType FlowEndpointType, list []string) []*Flow
type FlowTableManager ¶
type FlowTableManager struct {
	// contains filtered or unexported fields
}
    type FlowTableManagerAsync ¶
type FlowTableManagerAsync struct {
	FlowTableManagerAsyncParam
	// contains filtered or unexported fields
}
    func (*FlowTableManagerAsync) Register ¶
func (ftma *FlowTableManagerAsync) Register(p *FlowTableManagerAsyncParam)
func (*FlowTableManagerAsync) Unregister ¶
func (ftma *FlowTableManagerAsync) Unregister()
type FlowTableManagerAsyncFunction ¶
type FlowTableManagerAsyncFunction func(fn ExpireUpdateFunc, updateFrom int64)
type FlowTableManagerAsyncParam ¶
type FlowTableManagerAsyncParam struct {
	// contains filtered or unexported fields
}
    
       Source Files
      ¶
      Source Files
      ¶
    
- flow.go
- flow.pb.go
- manager.go
- statistics.go
- table.go
- testhelper.go
 Click to show internal directories. 
   Click to hide internal directories.