Documentation
¶
Overview ¶
Package flow is a generated protocol buffer package.
It is generated from these files:
flow/flow.proto flow/set.proto flow/request.proto
It has these top-level messages:
FlowEndpointStatistics FlowEndpointsStatistics FlowStatistics FlowMetricRange Flow FlowSet TermStringFilter TermInt64Filter NeStringFilter NeInt64Filter GtInt64Filter LtInt64Filter GteInt64Filter LteInt64Filter Filter BoolFilter FlowSearchQuery FlowSearchReply
Index ¶
- Constants
- Variables
- func GetAttribute(intf interface{}, name string) interface{}
- func GetFields(intf interface{}, fields []string) interface{}
- func HashFromValues(ab interface{}, ba interface{}) []byte
- func Var8bin(v []byte) []byte
- type BoolFilter
- type BoolFilterOp
- type ExpireUpdateFunc
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (f *Filter) Eval(value interface{}) bool
- func (f *Filter) Expression() string
- func (m *Filter) GetBoolFilter() *BoolFilter
- func (m *Filter) GetGtInt64Filter() *GtInt64Filter
- func (m *Filter) GetGteInt64Filter() *GteInt64Filter
- func (m *Filter) GetLtInt64Filter() *LtInt64Filter
- func (m *Filter) GetLteInt64Filter() *LteInt64Filter
- func (m *Filter) GetTermInt64Filter() *TermInt64Filter
- func (m *Filter) GetTermStringFilter() *TermStringFilter
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- type Flow
- func FlowFromGoPacket(ft *Table, packet *gopacket.Packet, length uint64, setter FlowProbeNodeSetter) *Flow
- func FlowsFromSFlowSample(ft *Table, sample *layers.SFlowFlowSample, setter FlowProbeNodeSetter) []*Flow
- func FromData(data []byte) (*Flow, error)
- func GenerateTestFlows(t *testing.T, ft *Table, baseSeed int64, uuid string) []*Flow
- func GenerateTestFlowsSymmetric(t *testing.T, ft *Table, baseSeed int64, uuid string) []*Flow
- func (*Flow) Descriptor() ([]byte, []int)
- func (flow *Flow) GetData() ([]byte, error)
- func (flow *Flow) GetLayerHash(layer FlowEndpointLayer) string
- func (m *Flow) GetMetricRange() *FlowMetricRange
- func (m *Flow) GetStatistics() *FlowStatistics
- func (*Flow) ProtoMessage()
- func (m *Flow) Reset()
- func (m *Flow) String() string
- func (flow *Flow) UpdateUUIDs(key string)
- type FlowEndpointLayer
- type FlowEndpointStatistics
- type FlowEndpointType
- type FlowEndpointsStatistics
- func (fs *FlowEndpointsStatistics) Copy() *FlowEndpointsStatistics
- func (*FlowEndpointsStatistics) Descriptor() ([]byte, []int)
- func (m *FlowEndpointsStatistics) GetAB() *FlowEndpointStatistics
- func (fes *FlowEndpointsStatistics) GetAttr(name string) interface{}
- 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 FlowHandler
- type FlowKey
- type FlowMetricRange
- type FlowProbeNodeSetter
- type FlowSearchQuery
- type FlowSearchReply
- type FlowSet
- func (fs *FlowSet) AvgBandwidth() (fsbw FlowSetBandwidth)
- func (fs *FlowSet) Bandwidth() (fsbw FlowSetBandwidth)
- func (*FlowSet) Descriptor() ([]byte, []int)
- func (fs *FlowSet) Filter(filter *Filter) *FlowSet
- func (m *FlowSet) GetFlows() []*Flow
- func (fs *FlowSet) Merge(ofs *FlowSet)
- func (*FlowSet) ProtoMessage()
- func (m *FlowSet) Reset()
- func (m *FlowSet) String() string
- type FlowSetBandwidth
- 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 (fs *FlowStatistics) GetLayer(layer FlowEndpointLayer) *FlowEndpointsStatistics
- func (fs *FlowStatistics) GetLayerHash(layer FlowEndpointLayer) (hash []byte)
- func (fs *FlowStatistics) Init(now int64, packet *gopacket.Packet, length uint64)
- func (*FlowStatistics) ProtoMessage()
- func (m *FlowStatistics) Reset()
- func (m *FlowStatistics) String() string
- func (fs *FlowStatistics) Update(now int64, packet *gopacket.Packet, length uint64)
- type GetAttr
- type GtInt64Filter
- type GteInt64Filter
- type HostNodeIDMap
- type LtInt64Filter
- type LteInt64Filter
- type NeInt64Filter
- type NeStringFilter
- type ProtocolType
- type Table
- func NewTable(updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
- func NewTableFromFlows(flows []*Flow, updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
- func NewTestFlowTableComplex(t *testing.T, updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
- func NewTestFlowTableSimple(t *testing.T) *Table
- func (ft *Table) Expire(now time.Time)
- func (ft *Table) FilterLast(last time.Duration) []*Flow
- func (ft *Table) Flush()
- func (ft *Table) GetFlow(key string) *Flow
- func (ft *Table) GetFlows(filter *Filter) *FlowSet
- func (ft *Table) GetOrCreateFlow(key string) (*Flow, bool)
- func (ft *Table) GetTime() int64
- func (ft *Table) Query(query *TableQuery) *TableReply
- func (ft *Table) RegisterDefault(fn func())
- func (ft *Table) SelectLayer(endpointType FlowEndpointType, list []string) *FlowSet
- func (ft *Table) Start()
- func (ft *Table) Stop()
- func (ft *Table) String() string
- func (ft *Table) Update(flows []*Flow)
- func (ft *Table) Updated(now time.Time)
- func (ft *Table) Window(start, end int64) *FlowSet
- type TableAllocator
- type TableClient
- type TableQuery
- type TableReply
- type TableServer
- type TermInt64Filter
- type TermStringFilter
Constants ¶
View Source
const (
Namespace = "Flow"
)
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 BoolFilter ¶
type BoolFilter struct {
Op BoolFilterOp `protobuf:"varint,1,opt,name=Op,json=op,enum=flow.BoolFilterOp" json:"Op,omitempty"`
Filters []*Filter `protobuf:"bytes,2,rep,name=Filters,json=filters" json:"Filters,omitempty"`
}
func (*BoolFilter) Descriptor ¶
func (*BoolFilter) Descriptor() ([]byte, []int)
func (*BoolFilter) Eval ¶
func (b *BoolFilter) Eval(value interface{}) bool
func (*BoolFilter) Expression ¶
func (b *BoolFilter) Expression() string
func (*BoolFilter) GetFilters ¶
func (m *BoolFilter) GetFilters() []*Filter
func (*BoolFilter) ProtoMessage ¶
func (*BoolFilter) ProtoMessage()
func (*BoolFilter) Reset ¶
func (m *BoolFilter) Reset()
func (*BoolFilter) String ¶
func (m *BoolFilter) String() string
type BoolFilterOp ¶
type BoolFilterOp int32
const ( BoolFilterOp_OR BoolFilterOp = 0 BoolFilterOp_AND BoolFilterOp = 1 BoolFilterOp_NOT BoolFilterOp = 2 )
func (BoolFilterOp) EnumDescriptor ¶
func (BoolFilterOp) EnumDescriptor() ([]byte, []int)
func (BoolFilterOp) String ¶
func (x BoolFilterOp) String() string
type Filter ¶
type Filter struct {
TermStringFilter *TermStringFilter `protobuf:"bytes,1,opt,name=TermStringFilter,json=termStringFilter" json:"TermStringFilter,omitempty"`
TermInt64Filter *TermInt64Filter `protobuf:"bytes,2,opt,name=TermInt64Filter,json=termInt64Filter" json:"TermInt64Filter,omitempty"`
GtInt64Filter *GtInt64Filter `protobuf:"bytes,3,opt,name=GtInt64Filter,json=gtInt64Filter" json:"GtInt64Filter,omitempty"`
LtInt64Filter *LtInt64Filter `protobuf:"bytes,4,opt,name=LtInt64Filter,json=ltInt64Filter" json:"LtInt64Filter,omitempty"`
GteInt64Filter *GteInt64Filter `protobuf:"bytes,5,opt,name=GteInt64Filter,json=gteInt64Filter" json:"GteInt64Filter,omitempty"`
LteInt64Filter *LteInt64Filter `protobuf:"bytes,6,opt,name=LteInt64Filter,json=lteInt64Filter" json:"LteInt64Filter,omitempty"`
BoolFilter *BoolFilter `protobuf:"bytes,7,opt,name=BoolFilter,json=boolFilter" json:"BoolFilter,omitempty"`
}
func (*Filter) GetBoolFilter ¶
func (m *Filter) GetBoolFilter() *BoolFilter
func (*Filter) GetGtInt64Filter ¶
func (m *Filter) GetGtInt64Filter() *GtInt64Filter
func (*Filter) GetGteInt64Filter ¶
func (m *Filter) GetGteInt64Filter() *GteInt64Filter
func (*Filter) GetLtInt64Filter ¶
func (m *Filter) GetLtInt64Filter() *LtInt64Filter
func (*Filter) GetLteInt64Filter ¶
func (m *Filter) GetLteInt64Filter() *LteInt64Filter
func (*Filter) GetTermInt64Filter ¶
func (m *Filter) GetTermInt64Filter() *TermInt64Filter
func (*Filter) GetTermStringFilter ¶
func (m *Filter) GetTermStringFilter() *TermStringFilter
type Flow ¶
type Flow struct {
// Flow Universally Unique IDentifier
//
// flow.UUID is unique in the universe, as it should be used as a key of an
// hashtable. By design 2 different flows, their UUID are always different.
// flow.UUID can be used as Database Index.
UUID string `protobuf:"bytes,1,opt,name=UUID,json=uUID" json:"UUID,omitempty"`
LayersPath string `protobuf:"bytes,2,opt,name=LayersPath,json=layersPath" json:"LayersPath,omitempty"`
// Data Flow info
Statistics *FlowStatistics `protobuf:"bytes,3,opt,name=Statistics,json=statistics" json:"Statistics,omitempty"`
// Flow Tracking IDentifier, from 1st packet bytes
//
// flow.TrackingID could be used to identify an unique flow whatever it has
// been captured on the infrastructure. flow.TrackingID is calculated from
// the bytes of the first packet of his session.
// flow.TrackingID can be used as a Tag.
TrackingID string `protobuf:"bytes,5,opt,name=TrackingID,json=trackingID" json:"TrackingID,omitempty"`
// Topology info
ProbeNodeUUID string `protobuf:"bytes,11,opt,name=ProbeNodeUUID,json=probeNodeUUID" json:"ProbeNodeUUID,omitempty"`
IfSrcNodeUUID string `protobuf:"bytes,14,opt,name=IfSrcNodeUUID,json=ifSrcNodeUUID" json:"IfSrcNodeUUID,omitempty"`
IfDstNodeUUID string `protobuf:"bytes,19,opt,name=IfDstNodeUUID,json=ifDstNodeUUID" json:"IfDstNodeUUID,omitempty"`
MetricRange *FlowMetricRange `protobuf:"bytes,20,opt,name=MetricRange,json=metricRange" json:"MetricRange,omitempty"`
}
func FlowFromGoPacket ¶
func FlowsFromSFlowSample ¶
func FlowsFromSFlowSample(ft *Table, sample *layers.SFlowFlowSample, setter FlowProbeNodeSetter) []*Flow
func GenerateTestFlows ¶
func GenerateTestFlowsSymmetric ¶
func (*Flow) GetLayerHash ¶
func (flow *Flow) GetLayerHash(layer FlowEndpointLayer) string
func (*Flow) GetMetricRange ¶
func (m *Flow) GetMetricRange() *FlowMetricRange
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" json:"Value,omitempty"`
Packets uint64 `protobuf:"varint,5,opt,name=Packets,json=packets" json:"Packets,omitempty"`
Bytes uint64 `protobuf:"varint,6,opt,name=Bytes,json=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 FlowEndpointType_IPV6 FlowEndpointType = 5 )
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,json=type,enum=flow.FlowEndpointType" json:"Type,omitempty"`
Hash []byte `protobuf:"bytes,2,opt,name=Hash,json=hash,proto3" json:"Hash,omitempty"`
AB *FlowEndpointStatistics `protobuf:"bytes,3,opt,name=AB,json=aB" json:"AB,omitempty"`
BA *FlowEndpointStatistics `protobuf:"bytes,4,opt,name=BA,json=bA" json:"BA,omitempty"`
}
func (*FlowEndpointsStatistics) Copy ¶
func (fs *FlowEndpointsStatistics) Copy() *FlowEndpointsStatistics
func (*FlowEndpointsStatistics) Descriptor ¶
func (*FlowEndpointsStatistics) Descriptor() ([]byte, []int)
func (*FlowEndpointsStatistics) GetAB ¶
func (m *FlowEndpointsStatistics) GetAB() *FlowEndpointStatistics
func (*FlowEndpointsStatistics) GetAttr ¶
func (fes *FlowEndpointsStatistics) GetAttr(name string) interface{}
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 FlowHandler ¶
type FlowHandler struct {
// contains filtered or unexported fields
}
func NewFlowHandler ¶
func NewFlowHandler(callback ExpireUpdateFunc, every time.Duration) *FlowHandler
type FlowMetricRange ¶
type FlowMetricRange struct {
Start int64 `protobuf:"varint,1,opt,name=Start,json=start" json:"Start,omitempty"`
Last int64 `protobuf:"varint,2,opt,name=Last,json=last" json:"Last,omitempty"`
ABPackets uint64 `protobuf:"varint,3,opt,name=ABPackets,json=aBPackets" json:"ABPackets,omitempty"`
ABBytes uint64 `protobuf:"varint,4,opt,name=ABBytes,json=aBBytes" json:"ABBytes,omitempty"`
BAPackets uint64 `protobuf:"varint,5,opt,name=BAPackets,json=bAPackets" json:"BAPackets,omitempty"`
BABytes uint64 `protobuf:"varint,6,opt,name=BABytes,json=bABytes" json:"BABytes,omitempty"`
}
func (*FlowMetricRange) Descriptor ¶
func (*FlowMetricRange) Descriptor() ([]byte, []int)
func (*FlowMetricRange) ProtoMessage ¶
func (*FlowMetricRange) ProtoMessage()
func (*FlowMetricRange) Reset ¶
func (m *FlowMetricRange) Reset()
func (*FlowMetricRange) String ¶
func (m *FlowMetricRange) String() string
type FlowSearchQuery ¶
type FlowSearchQuery struct {
Filter *Filter `protobuf:"bytes,1,opt,name=Filter,json=filter" json:"Filter,omitempty"`
}
func (*FlowSearchQuery) Descriptor ¶
func (*FlowSearchQuery) Descriptor() ([]byte, []int)
func (*FlowSearchQuery) GetFilter ¶
func (m *FlowSearchQuery) GetFilter() *Filter
func (*FlowSearchQuery) ProtoMessage ¶
func (*FlowSearchQuery) ProtoMessage()
func (*FlowSearchQuery) Reset ¶
func (m *FlowSearchQuery) Reset()
func (*FlowSearchQuery) String ¶
func (m *FlowSearchQuery) String() string
type FlowSearchReply ¶
type FlowSearchReply struct {
FlowSet *FlowSet `protobuf:"bytes,1,opt,name=FlowSet,json=flowSet" json:"FlowSet,omitempty"`
}
func (*FlowSearchReply) Descriptor ¶
func (*FlowSearchReply) Descriptor() ([]byte, []int)
func (*FlowSearchReply) GetFlowSet ¶
func (m *FlowSearchReply) GetFlowSet() *FlowSet
func (*FlowSearchReply) ProtoMessage ¶
func (*FlowSearchReply) ProtoMessage()
func (*FlowSearchReply) Reset ¶
func (m *FlowSearchReply) Reset()
func (*FlowSearchReply) String ¶
func (m *FlowSearchReply) String() string
type FlowSet ¶
type FlowSet struct {
Flows []*Flow `protobuf:"bytes,1,rep,name=Flows,json=flows" json:"Flows,omitempty"`
Start int64 `protobuf:"varint,2,opt,name=Start,json=start" json:"Start,omitempty"`
End int64 `protobuf:"varint,3,opt,name=End,json=end" json:"End,omitempty"`
}
func (*FlowSet) AvgBandwidth ¶
func (fs *FlowSet) AvgBandwidth() (fsbw FlowSetBandwidth)
func (*FlowSet) Bandwidth ¶
func (fs *FlowSet) Bandwidth() (fsbw FlowSetBandwidth)
type FlowSetBandwidth ¶
type FlowSetBandwidth struct {
ABpackets uint64
ABbytes uint64
BApackets uint64
BAbytes uint64
Duration int64
NBFlow uint64
}
func (FlowSetBandwidth) String ¶
func (fsbw FlowSetBandwidth) String() string
type FlowStatistics ¶
type FlowStatistics struct {
Start int64 `protobuf:"varint,1,opt,name=Start,json=start" json:"Start,omitempty"`
Last int64 `protobuf:"varint,2,opt,name=Last,json=last" json:"Last,omitempty"`
Endpoints []*FlowEndpointsStatistics `protobuf:"bytes,3,rep,name=Endpoints,json=endpoints" json:"Endpoints,omitempty"`
}
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) GetLayer ¶
func (fs *FlowStatistics) GetLayer(layer FlowEndpointLayer) *FlowEndpointsStatistics
func (*FlowStatistics) GetLayerHash ¶
func (fs *FlowStatistics) GetLayerHash(layer FlowEndpointLayer) (hash []byte)
func (*FlowStatistics) Init ¶
func (fs *FlowStatistics) Init(now int64, packet *gopacket.Packet, length uint64)
func (*FlowStatistics) ProtoMessage ¶
func (*FlowStatistics) ProtoMessage()
func (*FlowStatistics) Reset ¶
func (m *FlowStatistics) Reset()
func (*FlowStatistics) String ¶
func (m *FlowStatistics) String() string
type GtInt64Filter ¶
type GtInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*GtInt64Filter) Descriptor ¶
func (*GtInt64Filter) Descriptor() ([]byte, []int)
func (*GtInt64Filter) Eval ¶
func (r *GtInt64Filter) Eval(value interface{}) bool
func (*GtInt64Filter) Expression ¶
func (r *GtInt64Filter) Expression() string
func (*GtInt64Filter) ProtoMessage ¶
func (*GtInt64Filter) ProtoMessage()
func (*GtInt64Filter) Reset ¶
func (m *GtInt64Filter) Reset()
func (*GtInt64Filter) String ¶
func (m *GtInt64Filter) String() string
type GteInt64Filter ¶
type GteInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*GteInt64Filter) Descriptor ¶
func (*GteInt64Filter) Descriptor() ([]byte, []int)
func (*GteInt64Filter) Eval ¶
func (r *GteInt64Filter) Eval(value interface{}) bool
func (*GteInt64Filter) Expression ¶
func (r *GteInt64Filter) Expression() string
func (*GteInt64Filter) ProtoMessage ¶
func (*GteInt64Filter) ProtoMessage()
func (*GteInt64Filter) Reset ¶
func (m *GteInt64Filter) Reset()
func (*GteInt64Filter) String ¶
func (m *GteInt64Filter) String() string
type LtInt64Filter ¶
type LtInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*LtInt64Filter) Descriptor ¶
func (*LtInt64Filter) Descriptor() ([]byte, []int)
func (*LtInt64Filter) Eval ¶
func (r *LtInt64Filter) Eval(value interface{}) bool
func (*LtInt64Filter) Expression ¶
func (r *LtInt64Filter) Expression() string
func (*LtInt64Filter) ProtoMessage ¶
func (*LtInt64Filter) ProtoMessage()
func (*LtInt64Filter) Reset ¶
func (m *LtInt64Filter) Reset()
func (*LtInt64Filter) String ¶
func (m *LtInt64Filter) String() string
type LteInt64Filter ¶
type LteInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*LteInt64Filter) Descriptor ¶
func (*LteInt64Filter) Descriptor() ([]byte, []int)
func (*LteInt64Filter) Eval ¶
func (r *LteInt64Filter) Eval(value interface{}) bool
func (*LteInt64Filter) Expression ¶
func (r *LteInt64Filter) Expression() string
func (*LteInt64Filter) ProtoMessage ¶
func (*LteInt64Filter) ProtoMessage()
func (*LteInt64Filter) Reset ¶
func (m *LteInt64Filter) Reset()
func (*LteInt64Filter) String ¶
func (m *LteInt64Filter) String() string
type NeInt64Filter ¶
type NeInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*NeInt64Filter) Descriptor ¶
func (*NeInt64Filter) Descriptor() ([]byte, []int)
func (*NeInt64Filter) ProtoMessage ¶
func (*NeInt64Filter) ProtoMessage()
func (*NeInt64Filter) Reset ¶
func (m *NeInt64Filter) Reset()
func (*NeInt64Filter) String ¶
func (m *NeInt64Filter) String() string
type NeStringFilter ¶
type NeStringFilter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=Value,json=value" json:"Value,omitempty"`
}
func (*NeStringFilter) Descriptor ¶
func (*NeStringFilter) Descriptor() ([]byte, []int)
func (*NeStringFilter) ProtoMessage ¶
func (*NeStringFilter) ProtoMessage()
func (*NeStringFilter) Reset ¶
func (m *NeStringFilter) Reset()
func (*NeStringFilter) String ¶
func (m *NeStringFilter) String() string
type Table ¶
func NewTable ¶
func NewTable(updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
func NewTableFromFlows ¶
func NewTableFromFlows(flows []*Flow, updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
func NewTestFlowTableComplex ¶
func NewTestFlowTableComplex(t *testing.T, updateHandler *FlowHandler, expireHandler *FlowHandler) *Table
func (*Table) FilterLast ¶
Return a new flow.Table that contain <last> active flows
func (*Table) Query ¶
func (ft *Table) Query(query *TableQuery) *TableReply
func (*Table) SelectLayer ¶
func (ft *Table) SelectLayer(endpointType FlowEndpointType, list []string) *FlowSet
type TableAllocator ¶
func NewTableAllocator ¶
func NewTableAllocator(update, expire time.Duration) *TableAllocator
func (*TableAllocator) Alloc ¶
func (a *TableAllocator) Alloc(flowCallBack ExpireUpdateFunc) *Table
func (*TableAllocator) Flush ¶
func (a *TableAllocator) Flush()
func (*TableAllocator) QueryTable ¶
func (a *TableAllocator) QueryTable(query *TableQuery) *TableReply
func (*TableAllocator) Release ¶
func (a *TableAllocator) Release(t *Table)
type TableClient ¶
type TableClient struct {
shttp.DefaultWSServerEventHandler
WSServer *shttp.WSServer
// contains filtered or unexported fields
}
func NewTableClient ¶
func NewTableClient(w *shttp.WSServer) *TableClient
func (*TableClient) LookupFlows ¶
func (f *TableClient) LookupFlows(filter *Filter) (*FlowSet, error)
func (*TableClient) LookupFlowsByNodes ¶
func (f *TableClient) LookupFlowsByNodes(hnmap HostNodeIDMap, filter *Filter) (*FlowSet, error)
type TableQuery ¶
TableQuery contains a type and a query obj as an array of bytes. The query can be encoded in different ways according the type.
type TableReply ¶
TableReply is the response to a TableQuery containing a Status and an array of replies that can be encoded in many ways, ex: json, protobuf.
type TableServer ¶
type TableServer struct {
shttp.DefaultWSClientEventHandler
WSAsyncClient *shttp.WSAsyncClient
TableAllocator *TableAllocator
}
func NewServer ¶
func NewServer(allocator *TableAllocator, client *shttp.WSAsyncClient) *TableServer
func (*TableServer) OnMessage ¶
func (s *TableServer) OnMessage(msg shttp.WSMessage)
func (*TableServer) OnTableQuery ¶
func (s *TableServer) OnTableQuery(msg shttp.WSMessage)
type TermInt64Filter ¶
type TermInt64Filter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"`
}
func (*TermInt64Filter) Descriptor ¶
func (*TermInt64Filter) Descriptor() ([]byte, []int)
func (*TermInt64Filter) Eval ¶
func (t *TermInt64Filter) Eval(value interface{}) bool
func (*TermInt64Filter) Expression ¶
func (t *TermInt64Filter) Expression() string
func (*TermInt64Filter) ProtoMessage ¶
func (*TermInt64Filter) ProtoMessage()
func (*TermInt64Filter) Reset ¶
func (m *TermInt64Filter) Reset()
func (*TermInt64Filter) String ¶
func (m *TermInt64Filter) String() string
type TermStringFilter ¶
type TermStringFilter struct {
Key string `protobuf:"bytes,1,opt,name=Key,json=key" json:"Key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (*TermStringFilter) Descriptor ¶
func (*TermStringFilter) Descriptor() ([]byte, []int)
func (*TermStringFilter) Eval ¶
func (t *TermStringFilter) Eval(value interface{}) bool
func (*TermStringFilter) Expression ¶
func (t *TermStringFilter) Expression() string
func (*TermStringFilter) ProtoMessage ¶
func (*TermStringFilter) ProtoMessage()
func (*TermStringFilter) Reset ¶
func (m *TermStringFilter) Reset()
func (*TermStringFilter) String ¶
func (m *TermStringFilter) String() string
Source Files
¶
- allocator.go
- client.go
- filters.go
- flow.go
- flow.pb.go
- request.pb.go
- server.go
- set.go
- set.pb.go
- statistics.go
- table.go
- testhelper.go
Click to show internal directories.
Click to hide internal directories.