pbflow

package
v0.1.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Direction_name = map[int32]string{
		0: "INGRESS",
		1: "EGRESS",
	}
	Direction_value = map[string]int32{
		"INGRESS": 0,
		"EGRESS":  1,
	}
)

Enum value maps for Direction.

View Source
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)

View Source
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 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) Descriptor() ([]byte, []int)

Deprecated: Use DataLink.ProtoReflect.Descriptor instead.

func (*DataLink) GetDstMac

func (x *DataLink) GetDstMac() uint64

func (*DataLink) GetSrcMac

func (x *DataLink) GetSrcMac() uint64

func (*DataLink) ProtoMessage

func (*DataLink) ProtoMessage()

func (*DataLink) ProtoReflect

func (x *DataLink) ProtoReflect() protoreflect.Message

func (*DataLink) Reset

func (x *DataLink) Reset()

func (*DataLink) String

func (x *DataLink) String() string

type Direction

type Direction int32

as defined by field 61 in https://www.iana.org/assignments/ipfix/ipfix.xhtml

const (
	Direction_INGRESS Direction = 0
	Direction_EGRESS  Direction = 1
)

func (Direction) Descriptor

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

func (Direction) EnumDescriptor() ([]byte, []int)

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use IP.ProtoReflect.Descriptor instead.

func (*IP) GetIpFamily

func (m *IP) GetIpFamily() isIP_IpFamily

func (*IP) GetIpv4

func (x *IP) GetIpv4() uint32

func (*IP) GetIpv6

func (x *IP) GetIpv6() []byte

func (*IP) ProtoMessage

func (*IP) ProtoMessage()

func (*IP) ProtoReflect

func (x *IP) ProtoReflect() protoreflect.Message

func (*IP) Reset

func (x *IP) Reset()

func (*IP) String

func (x *IP) String() string

type IP_Ipv4

type IP_Ipv4 struct {
	Ipv4 uint32 `protobuf:"fixed32,1,opt,name=ipv4,proto3,oneof"`
}

type IP_Ipv6

type IP_Ipv6 struct {
	Ipv6 []byte `protobuf:"bytes,2,opt,name=ipv6,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) Descriptor() ([]byte, []int)

Deprecated: Use Network.ProtoReflect.Descriptor instead.

func (*Network) GetDstAddr

func (x *Network) GetDstAddr() *IP

func (*Network) GetSrcAddr

func (x *Network) GetSrcAddr() *IP

func (*Network) ProtoMessage

func (*Network) ProtoMessage()

func (*Network) ProtoReflect

func (x *Network) ProtoReflect() protoreflect.Message

func (*Network) Reset

func (x *Network) Reset()

func (*Network) String

func (x *Network) String() string

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 *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_flow_start,json=timeFlowStart,proto3" json:"time_flow_start,omitempty"`
	TimeFlowEnd   *timestamppb.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"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetBytes

func (x *Record) GetBytes() uint64
func (x *Record) GetDataLink() *DataLink

func (*Record) GetDirection

func (x *Record) GetDirection() Direction

func (*Record) GetEthProtocol

func (x *Record) GetEthProtocol() uint32

func (*Record) GetInterface

func (x *Record) GetInterface() string

func (*Record) GetNetwork

func (x *Record) GetNetwork() *Network

func (*Record) GetPackets

func (x *Record) GetPackets() uint64

func (*Record) GetTimeFlowEnd

func (x *Record) GetTimeFlowEnd() *timestamppb.Timestamp

func (*Record) GetTimeFlowStart

func (x *Record) GetTimeFlowStart() *timestamppb.Timestamp

func (*Record) GetTransport

func (x *Record) GetTransport() *Transport

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Records.ProtoReflect.Descriptor instead.

func (*Records) GetEntries

func (x *Records) GetEntries() []*Record

func (*Records) ProtoMessage

func (*Records) ProtoMessage()

func (*Records) ProtoReflect

func (x *Records) ProtoReflect() protoreflect.Message

func (*Records) Reset

func (x *Records) Reset()

func (*Records) String

func (x *Records) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Transport.ProtoReflect.Descriptor instead.

func (*Transport) GetDstPort

func (x *Transport) GetDstPort() uint32

func (*Transport) GetProtocol

func (x *Transport) GetProtocol() uint32

func (*Transport) GetSrcPort

func (x *Transport) GetSrcPort() uint32

func (*Transport) ProtoMessage

func (*Transport) ProtoMessage()

func (*Transport) ProtoReflect

func (x *Transport) ProtoReflect() protoreflect.Message

func (*Transport) Reset

func (x *Transport) Reset()

func (*Transport) String

func (x *Transport) String() string

type UnimplementedCollectorServer

type UnimplementedCollectorServer struct {
}

UnimplementedCollectorServer must be embedded to have forward compatible implementations.

func (UnimplementedCollectorServer) Send

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.

Jump to

Keyboard shortcuts

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