Documentation
¶
Index ¶
- Variables
- func RegisterFlowServiceServer(s grpc.ServiceRegistrar, srv FlowServiceServer)
- type Direction
- type FlowEvent
- func (*FlowEvent) Descriptor() ([]byte, []int)deprecated
- func (x *FlowEvent) GetEventId() []byte
- func (x *FlowEvent) GetFlowFields() *FlowFields
- func (x *FlowEvent) GetIsInitiator() bool
- func (x *FlowEvent) GetPublicKey() []byte
- func (x *FlowEvent) GetTimestamp() *timestamppb.Timestamp
- func (*FlowEvent) ProtoMessage()
- func (x *FlowEvent) ProtoReflect() protoreflect.Message
- func (x *FlowEvent) Reset()
- func (x *FlowEvent) String() string
- type FlowEventAck
- func (*FlowEventAck) Descriptor() ([]byte, []int)deprecated
- func (x *FlowEventAck) GetEventId() []byte
- func (x *FlowEventAck) GetIsInitiator() bool
- func (*FlowEventAck) ProtoMessage()
- func (x *FlowEventAck) ProtoReflect() protoreflect.Message
- func (x *FlowEventAck) Reset()
- func (x *FlowEventAck) String() string
- type FlowFields
- func (*FlowFields) Descriptor() ([]byte, []int)deprecated
- func (m *FlowFields) GetConnectionInfo() isFlowFields_ConnectionInfo
- func (x *FlowFields) GetDestIp() []byte
- func (x *FlowFields) GetDestResourceId() []byte
- func (x *FlowFields) GetDirection() Direction
- func (x *FlowFields) GetFlowId() []byte
- func (x *FlowFields) GetIcmpInfo() *ICMPInfo
- func (x *FlowFields) GetPortInfo() *PortInfo
- func (x *FlowFields) GetProtocol() uint32
- func (x *FlowFields) GetRuleId() []byte
- func (x *FlowFields) GetRxBytes() uint64
- func (x *FlowFields) GetRxPackets() uint64
- func (x *FlowFields) GetSourceIp() []byte
- func (x *FlowFields) GetSourceResourceId() []byte
- func (x *FlowFields) GetTxBytes() uint64
- func (x *FlowFields) GetTxPackets() uint64
- func (x *FlowFields) GetType() Type
- func (*FlowFields) ProtoMessage()
- func (x *FlowFields) ProtoReflect() protoreflect.Message
- func (x *FlowFields) Reset()
- func (x *FlowFields) String() string
- type FlowFields_IcmpInfo
- type FlowFields_PortInfo
- type FlowServiceClient
- type FlowServiceServer
- type FlowService_EventsClient
- type FlowService_EventsServer
- type ICMPInfo
- type PortInfo
- type Type
- type UnimplementedFlowServiceServer
- type UnsafeFlowServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Type_name = map[int32]string{ 0: "TYPE_UNKNOWN", 1: "TYPE_START", 2: "TYPE_END", 3: "TYPE_DROP", } Type_value = map[string]int32{ "TYPE_UNKNOWN": 0, "TYPE_START": 1, "TYPE_END": 2, "TYPE_DROP": 3, } )
Enum value maps for Type.
var ( Direction_name = map[int32]string{ 0: "DIRECTION_UNKNOWN", 1: "INGRESS", 2: "EGRESS", } Direction_value = map[string]int32{ "DIRECTION_UNKNOWN": 0, "INGRESS": 1, "EGRESS": 2, } )
Enum value maps for Direction.
var File_flow_proto protoreflect.FileDescriptor
var FlowService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "flow.FlowService", HandlerType: (*FlowServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Events", Handler: _FlowService_Events_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "flow.proto", }
FlowService_ServiceDesc is the grpc.ServiceDesc for FlowService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFlowServiceServer ¶
func RegisterFlowServiceServer(s grpc.ServiceRegistrar, srv FlowServiceServer)
Types ¶
type Direction ¶
type Direction int32
Flow direction
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 FlowEvent ¶
type FlowEvent struct {
// Unique client event identifier
EventId []byte `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
// When the event occurred
Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Public key of the sending peer
PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
FlowFields *FlowFields `protobuf:"bytes,4,opt,name=flow_fields,json=flowFields,proto3" json:"flow_fields,omitempty"`
IsInitiator bool `protobuf:"varint,5,opt,name=isInitiator,proto3" json:"isInitiator,omitempty"`
// contains filtered or unexported fields
}
func (*FlowEvent) Descriptor
deprecated
func (*FlowEvent) GetEventId ¶
func (*FlowEvent) GetFlowFields ¶
func (x *FlowEvent) GetFlowFields() *FlowFields
func (*FlowEvent) GetIsInitiator ¶
func (*FlowEvent) GetPublicKey ¶
func (*FlowEvent) GetTimestamp ¶
func (x *FlowEvent) GetTimestamp() *timestamppb.Timestamp
func (*FlowEvent) ProtoMessage ¶
func (*FlowEvent) ProtoMessage()
func (*FlowEvent) ProtoReflect ¶
func (x *FlowEvent) ProtoReflect() protoreflect.Message
type FlowEventAck ¶
type FlowEventAck struct {
// Unique client event identifier that has been ack'ed
EventId []byte `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
IsInitiator bool `protobuf:"varint,2,opt,name=isInitiator,proto3" json:"isInitiator,omitempty"`
// contains filtered or unexported fields
}
func (*FlowEventAck) Descriptor
deprecated
func (*FlowEventAck) Descriptor() ([]byte, []int)
Deprecated: Use FlowEventAck.ProtoReflect.Descriptor instead.
func (*FlowEventAck) GetEventId ¶
func (x *FlowEventAck) GetEventId() []byte
func (*FlowEventAck) GetIsInitiator ¶
func (x *FlowEventAck) GetIsInitiator() bool
func (*FlowEventAck) ProtoMessage ¶
func (*FlowEventAck) ProtoMessage()
func (*FlowEventAck) ProtoReflect ¶
func (x *FlowEventAck) ProtoReflect() protoreflect.Message
func (*FlowEventAck) Reset ¶
func (x *FlowEventAck) Reset()
func (*FlowEventAck) String ¶
func (x *FlowEventAck) String() string
type FlowFields ¶
type FlowFields struct {
// Unique client flow session identifier
FlowId []byte `protobuf:"bytes,1,opt,name=flow_id,json=flowId,proto3" json:"flow_id,omitempty"`
// Flow type
Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=flow.Type" json:"type,omitempty"`
// RuleId identifies the rule that allowed or denied the connection
RuleId []byte `protobuf:"bytes,3,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
// Initiating traffic direction
Direction Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=flow.Direction" json:"direction,omitempty"`
// IP protocol number
Protocol uint32 `protobuf:"varint,5,opt,name=protocol,proto3" json:"protocol,omitempty"`
// Source IP address
SourceIp []byte `protobuf:"bytes,6,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"`
// Destination IP address
DestIp []byte `protobuf:"bytes,7,opt,name=dest_ip,json=destIp,proto3" json:"dest_ip,omitempty"`
// Layer 4 -specific information
//
// Types that are assignable to ConnectionInfo:
//
// *FlowFields_PortInfo
// *FlowFields_IcmpInfo
ConnectionInfo isFlowFields_ConnectionInfo `protobuf_oneof:"connection_info"`
// Number of packets
RxPackets uint64 `protobuf:"varint,10,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
TxPackets uint64 `protobuf:"varint,11,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
// Number of bytes
RxBytes uint64 `protobuf:"varint,12,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
TxBytes uint64 `protobuf:"varint,13,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
// Resource ID
SourceResourceId []byte `protobuf:"bytes,14,opt,name=source_resource_id,json=sourceResourceId,proto3" json:"source_resource_id,omitempty"`
DestResourceId []byte `protobuf:"bytes,15,opt,name=dest_resource_id,json=destResourceId,proto3" json:"dest_resource_id,omitempty"`
// contains filtered or unexported fields
}
func (*FlowFields) Descriptor
deprecated
func (*FlowFields) Descriptor() ([]byte, []int)
Deprecated: Use FlowFields.ProtoReflect.Descriptor instead.
func (*FlowFields) GetConnectionInfo ¶
func (m *FlowFields) GetConnectionInfo() isFlowFields_ConnectionInfo
func (*FlowFields) GetDestIp ¶
func (x *FlowFields) GetDestIp() []byte
func (*FlowFields) GetDestResourceId ¶
func (x *FlowFields) GetDestResourceId() []byte
func (*FlowFields) GetDirection ¶
func (x *FlowFields) GetDirection() Direction
func (*FlowFields) GetFlowId ¶
func (x *FlowFields) GetFlowId() []byte
func (*FlowFields) GetIcmpInfo ¶
func (x *FlowFields) GetIcmpInfo() *ICMPInfo
func (*FlowFields) GetPortInfo ¶
func (x *FlowFields) GetPortInfo() *PortInfo
func (*FlowFields) GetProtocol ¶
func (x *FlowFields) GetProtocol() uint32
func (*FlowFields) GetRuleId ¶
func (x *FlowFields) GetRuleId() []byte
func (*FlowFields) GetRxBytes ¶
func (x *FlowFields) GetRxBytes() uint64
func (*FlowFields) GetRxPackets ¶
func (x *FlowFields) GetRxPackets() uint64
func (*FlowFields) GetSourceIp ¶
func (x *FlowFields) GetSourceIp() []byte
func (*FlowFields) GetSourceResourceId ¶
func (x *FlowFields) GetSourceResourceId() []byte
func (*FlowFields) GetTxBytes ¶
func (x *FlowFields) GetTxBytes() uint64
func (*FlowFields) GetTxPackets ¶
func (x *FlowFields) GetTxPackets() uint64
func (*FlowFields) GetType ¶
func (x *FlowFields) GetType() Type
func (*FlowFields) ProtoMessage ¶
func (*FlowFields) ProtoMessage()
func (*FlowFields) ProtoReflect ¶
func (x *FlowFields) ProtoReflect() protoreflect.Message
func (*FlowFields) Reset ¶
func (x *FlowFields) Reset()
func (*FlowFields) String ¶
func (x *FlowFields) String() string
type FlowFields_IcmpInfo ¶
type FlowFields_IcmpInfo struct {
// ICMP type and code
IcmpInfo *ICMPInfo `protobuf:"bytes,9,opt,name=icmp_info,json=icmpInfo,proto3,oneof"`
}
type FlowFields_PortInfo ¶
type FlowFields_PortInfo struct {
// TCP/UDP port information
PortInfo *PortInfo `protobuf:"bytes,8,opt,name=port_info,json=portInfo,proto3,oneof"`
}
type FlowServiceClient ¶
type FlowServiceClient interface {
// Client to receiver streams of events and acknowledgements
Events(ctx context.Context, opts ...grpc.CallOption) (FlowService_EventsClient, error)
}
FlowServiceClient is the client API for FlowService 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 NewFlowServiceClient ¶
func NewFlowServiceClient(cc grpc.ClientConnInterface) FlowServiceClient
type FlowServiceServer ¶
type FlowServiceServer interface {
// Client to receiver streams of events and acknowledgements
Events(FlowService_EventsServer) error
// contains filtered or unexported methods
}
FlowServiceServer is the server API for FlowService service. All implementations must embed UnimplementedFlowServiceServer for forward compatibility
type FlowService_EventsClient ¶
type FlowService_EventsClient interface {
Send(*FlowEvent) error
Recv() (*FlowEventAck, error)
grpc.ClientStream
}
type FlowService_EventsServer ¶
type FlowService_EventsServer interface {
Send(*FlowEventAck) error
Recv() (*FlowEvent, error)
grpc.ServerStream
}
type ICMPInfo ¶
type ICMPInfo struct {
IcmpType uint32 `protobuf:"varint,1,opt,name=icmp_type,json=icmpType,proto3" json:"icmp_type,omitempty"`
IcmpCode uint32 `protobuf:"varint,2,opt,name=icmp_code,json=icmpCode,proto3" json:"icmp_code,omitempty"`
// contains filtered or unexported fields
}
ICMP message information
func (*ICMPInfo) Descriptor
deprecated
func (*ICMPInfo) GetIcmpCode ¶
func (*ICMPInfo) GetIcmpType ¶
func (*ICMPInfo) ProtoMessage ¶
func (*ICMPInfo) ProtoMessage()
func (*ICMPInfo) ProtoReflect ¶
func (x *ICMPInfo) ProtoReflect() protoreflect.Message
type PortInfo ¶
type PortInfo struct {
SourcePort uint32 `protobuf:"varint,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
DestPort uint32 `protobuf:"varint,2,opt,name=dest_port,json=destPort,proto3" json:"dest_port,omitempty"`
// contains filtered or unexported fields
}
TCP/UDP port information
func (*PortInfo) Descriptor
deprecated
func (*PortInfo) GetDestPort ¶
func (*PortInfo) GetSourcePort ¶
func (*PortInfo) ProtoMessage ¶
func (*PortInfo) ProtoMessage()
func (*PortInfo) ProtoReflect ¶
func (x *PortInfo) ProtoReflect() protoreflect.Message
type Type ¶
type Type int32
Flow event types
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
type UnimplementedFlowServiceServer ¶
type UnimplementedFlowServiceServer struct {
}
UnimplementedFlowServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFlowServiceServer) Events ¶
func (UnimplementedFlowServiceServer) Events(FlowService_EventsServer) error
type UnsafeFlowServiceServer ¶
type UnsafeFlowServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFlowServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FlowServiceServer will result in compilation errors.