recorder

package
v1.16.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

README

Protocol Documentation

Table of Contents

Top

recorder/recorder.proto

FileSinkConfiguration

FileSinkConfiguration configures the file output. Possible future additions might be the selection of the output volume. The initial implementation will only support a single volume which is configured as a cilium-agent CLI flag.

Field Type Label Description
file_prefix string file_prefix is an optional prefix for the file name. Defaults to hubble if empty. Must match the following regex if not empty: ^[a-z][a-z0-9]{0,19}$ The generated filename will be of format <file_prefix><unixtime><unique_random>_<node_name>.pcap

FileSinkResult
Field Type Label Description
file_path string file_path is the absolute path to the captured pcap file

Filter
Field Type Label Description
source_cidr string source_cidr. Must not be empty. Set to 0.0.0.0/0 to match any IPv4 source address (::/0 for IPv6).
source_port uint32 source_port. Matches any source port if empty.
destination_cidr string destination_cidr. Must not be empty. Set to 0.0.0.0/0 to match any IPv4 destination address (::/0 for IPv6).
destination_port uint32 destination_port. Matches any destination port if empty.
protocol Protocol protocol. Matches any protocol if empty.

RecordRequest
Field Type Label Description
start StartRecording start starts a new recording with the given parameters.
stop StopRecording stop stops the running recording.

RecordResponse
Field Type Label Description
node_name string name of the node where this recording is happening
time google.protobuf.Timestamp time at which this event was observed on the above node
running RecordingRunningResponse running means that the recording is capturing packets. This is emitted in regular intervals
stopped RecordingStoppedResponse stopped means the recording has stopped

RecordingRunningResponse
Field Type Label Description
stats RecordingStatistics stats for the running recording

RecordingStatistics
Field Type Label Description
bytes_captured uint64 bytes_captured is the total amount of bytes captured in the recording
packets_captured uint64 packets_captured is the total amount of packets captured the recording
packets_lost uint64 packets_lost is the total amount of packets matching the filter during the recording, but never written to the sink because it was overloaded.
bytes_lost uint64 bytes_lost is the total amount of bytes matching the filter during the recording, but never written to the sink because it was overloaded.

RecordingStoppedResponse
Field Type Label Description
stats RecordingStatistics stats for the recording
filesink FileSinkResult filesink contains the path to the captured file

StartRecording
Field Type Label Description
filesink FileSinkConfiguration filesink configures the outfile of this recording Future alternative sink configurations may be added as a backwards-compatible change by moving this field into a oneof.
include Filter repeated include list for this recording. Packets matching any of the provided filters will be recorded.
max_capture_length uint32 max_capture_length specifies the maximum packet length. Full packet length will be captured if absent/zero.
stop_condition StopCondition stop_condition defines conditions which will cause the recording to stop early after any of the stop conditions has been hit

StopCondition

StopCondition defines one or more conditions which cause the recording to stop after they have been hit. Stop conditions are ignored if they are absent or zero-valued. If multiple conditions are defined, the recording stops after the first one is hit.

Field Type Label Description
bytes_captured_count uint64 bytes_captured_count stops the recording after at least this many bytes have been captured. Note: The resulting file might be slightly larger due to added pcap headers.
packets_captured_count uint64 packets_captured_count stops the recording after at least this many packets have been captured.
time_elapsed google.protobuf.Duration time_elapsed stops the recording after this duration has elapsed.

StopRecording

Protocol

Protocol is a one of the supported protocols for packet capture

Name Number Description
PROTOCOL_ANY 0
PROTOCOL_TCP 6
PROTOCOL_UDP 17
PROTOCOL_SCTP 132

Recorder

Recorder implements the Hubble module for capturing network packets

Method Name Request Type Response Type Description
Record RecordRequest stream RecordResponse stream Record can start and stop a single recording. The recording is automatically stopped if the client aborts this rpc call.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Documentation

Index

Constants

View Source
const (
	Recorder_Record_FullMethodName = "/recorder.Recorder/Record"
)

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0:   "PROTOCOL_ANY",
		6:   "PROTOCOL_TCP",
		17:  "PROTOCOL_UDP",
		132: "PROTOCOL_SCTP",
	}
	Protocol_value = map[string]int32{
		"PROTOCOL_ANY":  0,
		"PROTOCOL_TCP":  6,
		"PROTOCOL_UDP":  17,
		"PROTOCOL_SCTP": 132,
	}
)

Enum value maps for Protocol.

View Source
var File_recorder_recorder_proto protoreflect.FileDescriptor
View Source
var Recorder_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "recorder.Recorder",
	HandlerType: (*RecorderServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Record",
			Handler:       _Recorder_Record_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "recorder/recorder.proto",
}

Recorder_ServiceDesc is the grpc.ServiceDesc for Recorder service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterRecorderServer

func RegisterRecorderServer(s grpc.ServiceRegistrar, srv RecorderServer)

Types

type FileSinkConfiguration

type FileSinkConfiguration struct {

	// file_prefix is an optional prefix for the file name.
	// Defaults to `hubble` if empty. Must match the following regex if not
	// empty: ^[a-z][a-z0-9]{0,19}$
	// The generated filename will be of format
	//
	//	<file_prefix>_<unixtime>_<unique_random>_<node_name>.pcap
	FilePrefix string `protobuf:"bytes,1,opt,name=file_prefix,json=filePrefix,proto3" json:"file_prefix,omitempty"`
	// contains filtered or unexported fields
}

FileSinkConfiguration configures the file output. Possible future additions might be the selection of the output volume. The initial implementation will only support a single volume which is configured as a cilium-agent CLI flag.

func (*FileSinkConfiguration) Descriptor deprecated

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

Deprecated: Use FileSinkConfiguration.ProtoReflect.Descriptor instead.

func (*FileSinkConfiguration) GetFilePrefix

func (x *FileSinkConfiguration) GetFilePrefix() string

func (*FileSinkConfiguration) MarshalJSON

func (msg *FileSinkConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*FileSinkConfiguration) ProtoMessage

func (*FileSinkConfiguration) ProtoMessage()

func (*FileSinkConfiguration) ProtoReflect

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

func (*FileSinkConfiguration) Reset

func (x *FileSinkConfiguration) Reset()

func (*FileSinkConfiguration) String

func (x *FileSinkConfiguration) String() string

func (*FileSinkConfiguration) UnmarshalJSON

func (msg *FileSinkConfiguration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type FileSinkResult

type FileSinkResult struct {

	// file_path is the absolute path to the captured pcap file
	FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
	// contains filtered or unexported fields
}

func (*FileSinkResult) Descriptor deprecated

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

Deprecated: Use FileSinkResult.ProtoReflect.Descriptor instead.

func (*FileSinkResult) GetFilePath

func (x *FileSinkResult) GetFilePath() string

func (*FileSinkResult) MarshalJSON

func (msg *FileSinkResult) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*FileSinkResult) ProtoMessage

func (*FileSinkResult) ProtoMessage()

func (*FileSinkResult) ProtoReflect

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

func (*FileSinkResult) Reset

func (x *FileSinkResult) Reset()

func (*FileSinkResult) String

func (x *FileSinkResult) String() string

func (*FileSinkResult) UnmarshalJSON

func (msg *FileSinkResult) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Filter

type Filter struct {

	// source_cidr. Must not be empty.
	// Set to 0.0.0.0/0 to match any IPv4 source address (::/0 for IPv6).
	SourceCidr string `protobuf:"bytes,1,opt,name=source_cidr,json=sourceCidr,proto3" json:"source_cidr,omitempty"`
	// source_port. Matches any source port if empty.
	SourcePort uint32 `protobuf:"varint,2,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
	// destination_cidr. Must not be empty.
	// Set to 0.0.0.0/0 to match any IPv4 destination address (::/0 for IPv6).
	DestinationCidr string `protobuf:"bytes,3,opt,name=destination_cidr,json=destinationCidr,proto3" json:"destination_cidr,omitempty"`
	// destination_port. Matches any destination port if empty.
	DestinationPort uint32 `protobuf:"varint,4,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"`
	// protocol. Matches any protocol if empty.
	Protocol Protocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=recorder.Protocol" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

func (*Filter) Descriptor deprecated

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

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetDestinationCidr

func (x *Filter) GetDestinationCidr() string

func (*Filter) GetDestinationPort

func (x *Filter) GetDestinationPort() uint32

func (*Filter) GetProtocol

func (x *Filter) GetProtocol() Protocol

func (*Filter) GetSourceCidr

func (x *Filter) GetSourceCidr() string

func (*Filter) GetSourcePort

func (x *Filter) GetSourcePort() uint32

func (*Filter) MarshalJSON

func (msg *Filter) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

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

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

func (*Filter) UnmarshalJSON

func (msg *Filter) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Protocol

type Protocol int32

Protocol is a one of the supported protocols for packet capture

const (
	Protocol_PROTOCOL_ANY  Protocol = 0
	Protocol_PROTOCOL_TCP  Protocol = 6
	Protocol_PROTOCOL_UDP  Protocol = 17
	Protocol_PROTOCOL_SCTP Protocol = 132
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

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

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type RecordRequest

type RecordRequest struct {

	// Types that are assignable to RequestType:
	//
	//	*RecordRequest_Start
	//	*RecordRequest_Stop
	RequestType isRecordRequest_RequestType `protobuf_oneof:"request_type"`
	// contains filtered or unexported fields
}

func (*RecordRequest) Descriptor deprecated

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

Deprecated: Use RecordRequest.ProtoReflect.Descriptor instead.

func (*RecordRequest) GetRequestType

func (m *RecordRequest) GetRequestType() isRecordRequest_RequestType

func (*RecordRequest) GetStart

func (x *RecordRequest) GetStart() *StartRecording

func (*RecordRequest) GetStop

func (x *RecordRequest) GetStop() *StopRecording

func (*RecordRequest) MarshalJSON

func (msg *RecordRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*RecordRequest) ProtoMessage

func (*RecordRequest) ProtoMessage()

func (*RecordRequest) ProtoReflect

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

func (*RecordRequest) Reset

func (x *RecordRequest) Reset()

func (*RecordRequest) String

func (x *RecordRequest) String() string

func (*RecordRequest) UnmarshalJSON

func (msg *RecordRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type RecordRequest_Start

type RecordRequest_Start struct {
	// start starts a new recording with the given parameters.
	Start *StartRecording `protobuf:"bytes,1,opt,name=start,proto3,oneof"`
}

type RecordRequest_Stop

type RecordRequest_Stop struct {
	// stop stops the running recording.
	Stop *StopRecording `protobuf:"bytes,2,opt,name=stop,proto3,oneof"`
}

type RecordResponse

type RecordResponse struct {

	// name of the node where this recording is happening
	NodeName string `protobuf:"bytes,1,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	// time at which this event was observed on the above node
	Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// Note: In this initial design, any fatal error will be returned as
	// gRPC errors and are not part of the regular response type.
	// It is a forward-compatible change to introduce additional more
	// granular or structured error responses here.
	//
	// Types that are assignable to ResponseType:
	//
	//	*RecordResponse_Running
	//	*RecordResponse_Stopped
	ResponseType isRecordResponse_ResponseType `protobuf_oneof:"response_type"`
	// contains filtered or unexported fields
}

func (*RecordResponse) Descriptor deprecated

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

Deprecated: Use RecordResponse.ProtoReflect.Descriptor instead.

func (*RecordResponse) GetNodeName

func (x *RecordResponse) GetNodeName() string

func (*RecordResponse) GetResponseType

func (m *RecordResponse) GetResponseType() isRecordResponse_ResponseType

func (*RecordResponse) GetRunning

func (x *RecordResponse) GetRunning() *RecordingRunningResponse

func (*RecordResponse) GetStopped

func (x *RecordResponse) GetStopped() *RecordingStoppedResponse

func (*RecordResponse) GetTime

func (x *RecordResponse) GetTime() *timestamppb.Timestamp

func (*RecordResponse) MarshalJSON

func (msg *RecordResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*RecordResponse) ProtoMessage

func (*RecordResponse) ProtoMessage()

func (*RecordResponse) ProtoReflect

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

func (*RecordResponse) Reset

func (x *RecordResponse) Reset()

func (*RecordResponse) String

func (x *RecordResponse) String() string

func (*RecordResponse) UnmarshalJSON

func (msg *RecordResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type RecordResponse_Running

type RecordResponse_Running struct {
	// running means that the recording is capturing packets. This is
	// emitted in regular intervals
	Running *RecordingRunningResponse `protobuf:"bytes,3,opt,name=running,proto3,oneof"`
}

type RecordResponse_Stopped

type RecordResponse_Stopped struct {
	// stopped means the recording has stopped
	Stopped *RecordingStoppedResponse `protobuf:"bytes,4,opt,name=stopped,proto3,oneof"`
}

type RecorderClient

type RecorderClient interface {
	// Record can start and stop a single recording. The recording is
	// automatically stopped if the client aborts this rpc call.
	Record(ctx context.Context, opts ...grpc.CallOption) (Recorder_RecordClient, error)
}

RecorderClient is the client API for Recorder 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.

Recorder implements the Hubble module for capturing network packets

func NewRecorderClient

func NewRecorderClient(cc grpc.ClientConnInterface) RecorderClient

type RecorderServer

type RecorderServer interface {
	// Record can start and stop a single recording. The recording is
	// automatically stopped if the client aborts this rpc call.
	Record(Recorder_RecordServer) error
}

RecorderServer is the server API for Recorder service. All implementations should embed UnimplementedRecorderServer for forward compatibility

Recorder implements the Hubble module for capturing network packets

type Recorder_RecordClient

type Recorder_RecordClient interface {
	Send(*RecordRequest) error
	Recv() (*RecordResponse, error)
	grpc.ClientStream
}

type Recorder_RecordServer

type Recorder_RecordServer interface {
	Send(*RecordResponse) error
	Recv() (*RecordRequest, error)
	grpc.ServerStream
}

type RecordingRunningResponse

type RecordingRunningResponse struct {

	// stats for the running recording
	Stats *RecordingStatistics `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*RecordingRunningResponse) Descriptor deprecated

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

Deprecated: Use RecordingRunningResponse.ProtoReflect.Descriptor instead.

func (*RecordingRunningResponse) GetStats

func (*RecordingRunningResponse) MarshalJSON

func (msg *RecordingRunningResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*RecordingRunningResponse) ProtoMessage

func (*RecordingRunningResponse) ProtoMessage()

func (*RecordingRunningResponse) ProtoReflect

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

func (*RecordingRunningResponse) Reset

func (x *RecordingRunningResponse) Reset()

func (*RecordingRunningResponse) String

func (x *RecordingRunningResponse) String() string

func (*RecordingRunningResponse) UnmarshalJSON

func (msg *RecordingRunningResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type RecordingStatistics

type RecordingStatistics struct {

	// bytes_captured is the total amount of bytes captured in the recording
	BytesCaptured uint64 `protobuf:"varint,1,opt,name=bytes_captured,json=bytesCaptured,proto3" json:"bytes_captured,omitempty"`
	// packets_captured is the total amount of packets captured the recording
	PacketsCaptured uint64 `protobuf:"varint,2,opt,name=packets_captured,json=packetsCaptured,proto3" json:"packets_captured,omitempty"`
	// packets_lost is the total amount of packets matching the filter during
	// the recording, but never written to the sink because it was overloaded.
	PacketsLost uint64 `protobuf:"varint,3,opt,name=packets_lost,json=packetsLost,proto3" json:"packets_lost,omitempty"`
	// bytes_lost is the total amount of bytes matching the filter during
	// the recording, but never written to the sink because it was overloaded.
	BytesLost uint64 `protobuf:"varint,4,opt,name=bytes_lost,json=bytesLost,proto3" json:"bytes_lost,omitempty"`
	// contains filtered or unexported fields
}

func (*RecordingStatistics) Descriptor deprecated

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

Deprecated: Use RecordingStatistics.ProtoReflect.Descriptor instead.

func (*RecordingStatistics) GetBytesCaptured

func (x *RecordingStatistics) GetBytesCaptured() uint64

func (*RecordingStatistics) GetBytesLost

func (x *RecordingStatistics) GetBytesLost() uint64

func (*RecordingStatistics) GetPacketsCaptured

func (x *RecordingStatistics) GetPacketsCaptured() uint64

func (*RecordingStatistics) GetPacketsLost

func (x *RecordingStatistics) GetPacketsLost() uint64

func (*RecordingStatistics) MarshalJSON

func (msg *RecordingStatistics) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*RecordingStatistics) ProtoMessage

func (*RecordingStatistics) ProtoMessage()

func (*RecordingStatistics) ProtoReflect

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

func (*RecordingStatistics) Reset

func (x *RecordingStatistics) Reset()

func (*RecordingStatistics) String

func (x *RecordingStatistics) String() string

func (*RecordingStatistics) UnmarshalJSON

func (msg *RecordingStatistics) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type RecordingStoppedResponse

type RecordingStoppedResponse struct {

	// stats for the recording
	Stats *RecordingStatistics `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
	// filesink contains the path to the captured file
	Filesink *FileSinkResult `protobuf:"bytes,2,opt,name=filesink,proto3" json:"filesink,omitempty"`
	// contains filtered or unexported fields
}

func (*RecordingStoppedResponse) Descriptor deprecated

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

Deprecated: Use RecordingStoppedResponse.ProtoReflect.Descriptor instead.

func (*RecordingStoppedResponse) GetFilesink

func (x *RecordingStoppedResponse) GetFilesink() *FileSinkResult

func (*RecordingStoppedResponse) GetStats

func (*RecordingStoppedResponse) MarshalJSON

func (msg *RecordingStoppedResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*RecordingStoppedResponse) ProtoMessage

func (*RecordingStoppedResponse) ProtoMessage()

func (*RecordingStoppedResponse) ProtoReflect

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

func (*RecordingStoppedResponse) Reset

func (x *RecordingStoppedResponse) Reset()

func (*RecordingStoppedResponse) String

func (x *RecordingStoppedResponse) String() string

func (*RecordingStoppedResponse) UnmarshalJSON

func (msg *RecordingStoppedResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type StartRecording

type StartRecording struct {

	// filesink configures the outfile of this recording
	// Future alternative sink configurations may be added as a
	// backwards-compatible change by moving this field into a oneof.
	Filesink *FileSinkConfiguration `protobuf:"bytes,1,opt,name=filesink,proto3" json:"filesink,omitempty"`
	// include list for this recording. Packets matching any of the provided
	// filters will be recorded.
	Include []*Filter `protobuf:"bytes,2,rep,name=include,proto3" json:"include,omitempty"`
	// max_capture_length specifies the maximum packet length.
	// Full packet length will be captured if absent/zero.
	MaxCaptureLength uint32 `protobuf:"varint,3,opt,name=max_capture_length,json=maxCaptureLength,proto3" json:"max_capture_length,omitempty"`
	// stop_condition defines conditions which will cause the recording to
	// stop early after any of the stop conditions has been hit
	StopCondition *StopCondition `protobuf:"bytes,4,opt,name=stop_condition,json=stopCondition,proto3" json:"stop_condition,omitempty"`
	// contains filtered or unexported fields
}

func (*StartRecording) Descriptor deprecated

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

Deprecated: Use StartRecording.ProtoReflect.Descriptor instead.

func (*StartRecording) GetFilesink

func (x *StartRecording) GetFilesink() *FileSinkConfiguration

func (*StartRecording) GetInclude

func (x *StartRecording) GetInclude() []*Filter

func (*StartRecording) GetMaxCaptureLength

func (x *StartRecording) GetMaxCaptureLength() uint32

func (*StartRecording) GetStopCondition

func (x *StartRecording) GetStopCondition() *StopCondition

func (*StartRecording) MarshalJSON

func (msg *StartRecording) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*StartRecording) ProtoMessage

func (*StartRecording) ProtoMessage()

func (*StartRecording) ProtoReflect

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

func (*StartRecording) Reset

func (x *StartRecording) Reset()

func (*StartRecording) String

func (x *StartRecording) String() string

func (*StartRecording) UnmarshalJSON

func (msg *StartRecording) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type StopCondition

type StopCondition struct {

	// bytes_captured_count stops the recording after at least this many bytes
	// have been captured. Note: The resulting file might be slightly larger due
	// to added pcap headers.
	BytesCapturedCount uint64 `protobuf:"varint,1,opt,name=bytes_captured_count,json=bytesCapturedCount,proto3" json:"bytes_captured_count,omitempty"`
	// packets_captured_count stops the recording after at least this many packets have
	// been captured.
	PacketsCapturedCount uint64 `protobuf:"varint,2,opt,name=packets_captured_count,json=packetsCapturedCount,proto3" json:"packets_captured_count,omitempty"`
	// time_elapsed stops the recording after this duration has elapsed.
	TimeElapsed *durationpb.Duration `protobuf:"bytes,3,opt,name=time_elapsed,json=timeElapsed,proto3" json:"time_elapsed,omitempty"`
	// contains filtered or unexported fields
}

StopCondition defines one or more conditions which cause the recording to stop after they have been hit. Stop conditions are ignored if they are absent or zero-valued. If multiple conditions are defined, the recording stops after the first one is hit.

func (*StopCondition) Descriptor deprecated

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

Deprecated: Use StopCondition.ProtoReflect.Descriptor instead.

func (*StopCondition) GetBytesCapturedCount

func (x *StopCondition) GetBytesCapturedCount() uint64

func (*StopCondition) GetPacketsCapturedCount

func (x *StopCondition) GetPacketsCapturedCount() uint64

func (*StopCondition) GetTimeElapsed

func (x *StopCondition) GetTimeElapsed() *durationpb.Duration

func (*StopCondition) MarshalJSON

func (msg *StopCondition) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*StopCondition) ProtoMessage

func (*StopCondition) ProtoMessage()

func (*StopCondition) ProtoReflect

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

func (*StopCondition) Reset

func (x *StopCondition) Reset()

func (*StopCondition) String

func (x *StopCondition) String() string

func (*StopCondition) UnmarshalJSON

func (msg *StopCondition) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type StopRecording

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

func (*StopRecording) Descriptor deprecated

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

Deprecated: Use StopRecording.ProtoReflect.Descriptor instead.

func (*StopRecording) MarshalJSON

func (msg *StopRecording) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*StopRecording) ProtoMessage

func (*StopRecording) ProtoMessage()

func (*StopRecording) ProtoReflect

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

func (*StopRecording) Reset

func (x *StopRecording) Reset()

func (*StopRecording) String

func (x *StopRecording) String() string

func (*StopRecording) UnmarshalJSON

func (msg *StopRecording) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type UnimplementedRecorderServer

type UnimplementedRecorderServer struct {
}

UnimplementedRecorderServer should be embedded to have forward compatible implementations.

func (UnimplementedRecorderServer) Record

type UnsafeRecorderServer

type UnsafeRecorderServer interface {
	// contains filtered or unexported methods
}

UnsafeRecorderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RecorderServer will result in compilation errors.

Jump to

Keyboard shortcuts

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