Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer)
 - type CollectorClient
 - type CollectorReply
 - type CollectorServer
 - type DataLink
 - type Direction
 - type IP
 - type IP_Ipv4
 - type IP_Ipv6
 - type Network
 - type Record
 - func (*Record) Descriptor() ([]byte, []int)deprecated
 - func (x *Record) GetAgentIp() *IP
 - func (x *Record) GetBytes() uint64
 - func (x *Record) GetDataLink() *DataLink
 - func (x *Record) GetDirection() Direction
 - func (x *Record) GetDuplicate() bool
 - func (x *Record) GetEthProtocol() uint32
 - func (x *Record) GetFlags() uint32
 - func (x *Record) GetInterface() string
 - func (x *Record) GetNetwork() *Network
 - func (x *Record) GetPackets() uint64
 - func (x *Record) GetTimeFlowEnd() *timestamp.Timestamp
 - func (x *Record) GetTimeFlowStart() *timestamp.Timestamp
 - func (x *Record) GetTransport() *Transport
 - func (*Record) ProtoMessage()
 - func (x *Record) ProtoReflect() protoreflect.Message
 - func (x *Record) Reset()
 - func (x *Record) String() string
 
- type Records
 - type Transport
 - func (*Transport) Descriptor() ([]byte, []int)deprecated
 - func (x *Transport) GetDstPort() uint32
 - func (x *Transport) GetProtocol() uint32
 - func (x *Transport) GetSrcPort() uint32
 - func (*Transport) ProtoMessage()
 - func (x *Transport) ProtoReflect() protoreflect.Message
 - func (x *Transport) Reset()
 - func (x *Transport) String() string
 
- type UnimplementedCollectorServer
 - type UnsafeCollectorServer
 
Constants ¶
This section is empty.
Variables ¶
var ( Direction_name = map[int32]string{ 0: "INGRESS", 1: "EGRESS", } Direction_value = map[string]int32{ "INGRESS": 0, "EGRESS": 1, } )
Enum value maps for Direction.
var Collector_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pbflow.Collector", HandlerType: (*CollectorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _Collector_Send_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/flow.proto", }
Collector_ServiceDesc is the grpc.ServiceDesc for Collector service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_flow_proto protoreflect.FileDescriptor
    Functions ¶
func RegisterCollectorServer ¶
func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer)
Types ¶
type CollectorClient ¶
type CollectorClient interface {
	Send(ctx context.Context, in *Records, opts ...grpc.CallOption) (*CollectorReply, error)
}
    CollectorClient is the client API for Collector service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCollectorClient ¶
func NewCollectorClient(cc grpc.ClientConnInterface) CollectorClient
type CollectorReply ¶
type CollectorReply struct {
	// contains filtered or unexported fields
}
    intentionally empty
        
          
            func (*CollectorReply) Descriptor
            deprecated
            
          
  
    
  
      
      func (*CollectorReply) Descriptor() ([]byte, []int)
Deprecated: Use CollectorReply.ProtoReflect.Descriptor instead.
func (*CollectorReply) ProtoMessage ¶
func (*CollectorReply) ProtoMessage()
func (*CollectorReply) ProtoReflect ¶
func (x *CollectorReply) ProtoReflect() protoreflect.Message
func (*CollectorReply) Reset ¶
func (x *CollectorReply) Reset()
func (*CollectorReply) String ¶
func (x *CollectorReply) String() string
type CollectorServer ¶
type CollectorServer interface {
	Send(context.Context, *Records) (*CollectorReply, error)
	// contains filtered or unexported methods
}
    CollectorServer is the server API for Collector service. All implementations must embed UnimplementedCollectorServer for forward compatibility
type DataLink ¶
type DataLink struct {
	SrcMac uint64 `protobuf:"varint,1,opt,name=src_mac,json=srcMac,proto3" json:"src_mac,omitempty"`
	DstMac uint64 `protobuf:"varint,2,opt,name=dst_mac,json=dstMac,proto3" json:"dst_mac,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*DataLink) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*DataLink) ProtoMessage ¶
func (*DataLink) ProtoMessage()
func (*DataLink) ProtoReflect ¶
func (x *DataLink) ProtoReflect() protoreflect.Message
type Direction ¶
type Direction int32
as defined by field 61 in https://www.iana.org/assignments/ipfix/ipfix.xhtml
func (Direction) Descriptor ¶
func (Direction) Descriptor() protoreflect.EnumDescriptor
        
          
            func (Direction) EnumDescriptor
            deprecated
            
          
  
    
  
      
      
    func (Direction) Number ¶
func (x Direction) Number() protoreflect.EnumNumber
func (Direction) Type ¶
func (Direction) Type() protoreflect.EnumType
type IP ¶
type IP struct {
	// Types that are assignable to IpFamily:
	//	*IP_Ipv4
	//	*IP_Ipv6
	IpFamily isIP_IpFamily `protobuf_oneof:"ip_family"`
	// contains filtered or unexported fields
}
    
        
          
            func (*IP) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*IP) GetIpFamily ¶
func (m *IP) GetIpFamily() isIP_IpFamily
func (*IP) ProtoMessage ¶
func (*IP) ProtoMessage()
func (*IP) ProtoReflect ¶
func (x *IP) ProtoReflect() protoreflect.Message
type IP_Ipv4 ¶
type IP_Ipv4 struct {
	Ipv4 uint32 `protobuf:"fixed32,1,opt,name=ipv4,proto3,oneof"`
}
    type Network ¶
type Network struct {
	SrcAddr *IP `protobuf:"bytes,1,opt,name=src_addr,json=srcAddr,proto3" json:"src_addr,omitempty"`
	DstAddr *IP `protobuf:"bytes,2,opt,name=dst_addr,json=dstAddr,proto3" json:"dst_addr,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Network) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Network) GetDstAddr ¶
func (*Network) GetSrcAddr ¶
func (*Network) ProtoMessage ¶
func (*Network) ProtoMessage()
func (*Network) ProtoReflect ¶
func (x *Network) ProtoReflect() protoreflect.Message
type Record ¶
type Record struct {
	// protocol as defined by ETH_P_* in linux/if_ether.h
	// https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_ether.h
	EthProtocol   uint32               `protobuf:"varint,1,opt,name=eth_protocol,json=ethProtocol,proto3" json:"eth_protocol,omitempty"`
	Direction     Direction            `protobuf:"varint,2,opt,name=direction,proto3,enum=pbflow.Direction" json:"direction,omitempty"`
	TimeFlowStart *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time_flow_start,json=timeFlowStart,proto3" json:"time_flow_start,omitempty"`
	TimeFlowEnd   *timestamp.Timestamp `protobuf:"bytes,4,opt,name=time_flow_end,json=timeFlowEnd,proto3" json:"time_flow_end,omitempty"`
	// OSI-layer attributes
	DataLink  *DataLink  `protobuf:"bytes,5,opt,name=data_link,json=dataLink,proto3" json:"data_link,omitempty"`
	Network   *Network   `protobuf:"bytes,6,opt,name=network,proto3" json:"network,omitempty"`
	Transport *Transport `protobuf:"bytes,7,opt,name=transport,proto3" json:"transport,omitempty"`
	Bytes     uint64     `protobuf:"varint,8,opt,name=bytes,proto3" json:"bytes,omitempty"`
	Packets   uint64     `protobuf:"varint,9,opt,name=packets,proto3" json:"packets,omitempty"`
	Interface string     `protobuf:"bytes,10,opt,name=interface,proto3" json:"interface,omitempty"`
	// if true, the same flow has been recorded via another interface.
	// From all the duplicate flows, one will set this value to false and the rest will be true.
	Duplicate bool `protobuf:"varint,11,opt,name=duplicate,proto3" json:"duplicate,omitempty"`
	// Agent IP address to help identifying the source of the flow
	AgentIp *IP    `protobuf:"bytes,12,opt,name=agent_ip,json=agentIp,proto3" json:"agent_ip,omitempty"`
	Flags   uint32 `protobuf:"varint,13,opt,name=flags,proto3" json:"flags,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Record) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Record) GetAgentIp ¶ added in v0.2.4
func (*Record) GetDataLink ¶
func (*Record) GetDirection ¶
func (*Record) GetDuplicate ¶ added in v0.2.2
func (*Record) GetEthProtocol ¶
func (*Record) GetInterface ¶
func (*Record) GetNetwork ¶
func (*Record) GetPackets ¶
func (*Record) GetTimeFlowEnd ¶
func (*Record) GetTimeFlowStart ¶
func (*Record) GetTransport ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type Records ¶
type Records struct {
	Entries []*Record `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Records) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Records) GetEntries ¶
func (*Records) ProtoMessage ¶
func (*Records) ProtoMessage()
func (*Records) ProtoReflect ¶
func (x *Records) ProtoReflect() protoreflect.Message
type Transport ¶
type Transport struct {
	SrcPort uint32 `protobuf:"varint,1,opt,name=src_port,json=srcPort,proto3" json:"src_port,omitempty"`
	DstPort uint32 `protobuf:"varint,2,opt,name=dst_port,json=dstPort,proto3" json:"dst_port,omitempty"`
	// protocol as defined by IPPROTO_* in linux/in.h
	// https://github.com/torvalds/linux/blob/master/include/uapi/linux/in.h
	Protocol uint32 `protobuf:"varint,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Transport) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Transport) GetDstPort ¶
func (*Transport) GetProtocol ¶
func (*Transport) GetSrcPort ¶
func (*Transport) ProtoMessage ¶
func (*Transport) ProtoMessage()
func (*Transport) ProtoReflect ¶
func (x *Transport) ProtoReflect() protoreflect.Message
type UnimplementedCollectorServer ¶
type UnimplementedCollectorServer struct {
}
    UnimplementedCollectorServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectorServer) Send ¶
func (UnimplementedCollectorServer) Send(context.Context, *Records) (*CollectorReply, error)
type UnsafeCollectorServer ¶
type UnsafeCollectorServer interface {
	// contains filtered or unexported methods
}
    UnsafeCollectorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectorServer will result in compilation errors.