flow

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

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

func LayerFlow

func LayerFlow(l gopacket.Layer) gopacket.Flow

Types

type ExpireFunc

type ExpireFunc 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"`
	// 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 FLowsFromSFlowSample

func FLowsFromSFlowSample(ft *FlowTable, sample *layers.SFlowFlowSample, probePath *string) []*Flow

func FromData

func FromData(data []byte) (*Flow, error)

func (*Flow) Descriptor

func (*Flow) Descriptor() ([]byte, []int)

func (*Flow) GetData

func (flow *Flow) GetData() ([]byte, error)

func (*Flow) GetStatistics

func (m *Flow) GetStatistics() *FlowStatistics

func (*Flow) ProtoMessage

func (*Flow) ProtoMessage()

func (*Flow) Reset

func (m *Flow) Reset()

func (*Flow) String

func (m *Flow) String() string

type FlowEndpointStatistics

type FlowEndpointStatistics struct {
	Type    FlowEndpointType `protobuf:"varint,1,opt,name=Type,enum=flow.FlowEndpointType" json:"Type,omitempty"`
	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"`
	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 (*FlowEndpointsStatistics) GetBA

func (*FlowEndpointsStatistics) ProtoMessage

func (*FlowEndpointsStatistics) ProtoMessage()

func (*FlowEndpointsStatistics) Reset

func (m *FlowEndpointsStatistics) Reset()

func (*FlowEndpointsStatistics) String

func (m *FlowEndpointsStatistics) String() string

type FlowKey

type FlowKey struct {
	// contains filtered or unexported fields
}

func (FlowKey) String

func (key FlowKey) String() string

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 map[int32]*FlowEndpointsStatistics `` /* 139-byte string literal not displayed */
}

func NewFlowStatistics

func NewFlowStatistics() *FlowStatistics

func (*FlowStatistics) Descriptor

func (*FlowStatistics) Descriptor() ([]byte, []int)

func (*FlowStatistics) GetEndpoints

func (m *FlowStatistics) GetEndpoints() map[int32]*FlowEndpointsStatistics

func (*FlowStatistics) ProtoMessage

func (*FlowStatistics) ProtoMessage()

func (*FlowStatistics) Reset

func (m *FlowStatistics) Reset()

func (*FlowStatistics) String

func (m *FlowStatistics) String() string

type FlowTable

type FlowTable struct {
	// contains filtered or unexported fields
}

func NewFlowTable

func NewFlowTable() *FlowTable

func (*FlowTable) AsyncExpire

func (ft *FlowTable) AsyncExpire(fn ExpireFunc, every time.Duration)

func (*FlowTable) FilterLast

func (ft *FlowTable) FilterLast(last time.Duration) []*Flow

Return a new FlowTable that contain <last> active flows

func (*FlowTable) GetFlow

func (ft *FlowTable) GetFlow(key string) (flow *Flow, new bool)

func (*FlowTable) IsExist

func (ft *FlowTable) IsExist(f *Flow) bool

func (*FlowTable) JSONFlowConversationEthernetPath

func (ft *FlowTable) JSONFlowConversationEthernetPath() string

func (*FlowTable) NewFlowTableFromFlows

func (ft *FlowTable) NewFlowTableFromFlows(flows []*Flow) *FlowTable

func (*FlowTable) String

func (ft *FlowTable) String() string

func (*FlowTable) Update

func (ft *FlowTable) Update(flows []*Flow)

type FlowTableAsyncNotificationUpdate

type FlowTableAsyncNotificationUpdate interface {
	AsyncNotificationUpdate(every time.Duration)
}

Source Files

  • flow.go
  • flow.pb.go
  • statistics.go
  • table.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL