Documentation
¶
Index ¶
- Variables
- type DefaultSocketInterface
- func (*DefaultSocketInterface) Descriptor() ([]byte, []int)deprecated
- func (x *DefaultSocketInterface) GetIoUringOptions() *IoUringOptions
- func (*DefaultSocketInterface) ProtoMessage()
- func (x *DefaultSocketInterface) ProtoReflect() protoreflect.Message
- func (x *DefaultSocketInterface) Reset()
- func (x *DefaultSocketInterface) String() string
- func (m *DefaultSocketInterface) Validate() error
- func (m *DefaultSocketInterface) ValidateAll() error
- type DefaultSocketInterfaceMultiError
- type DefaultSocketInterfaceValidationError
- func (e DefaultSocketInterfaceValidationError) Cause() error
- func (e DefaultSocketInterfaceValidationError) Error() string
- func (e DefaultSocketInterfaceValidationError) ErrorName() string
- func (e DefaultSocketInterfaceValidationError) Field() string
- func (e DefaultSocketInterfaceValidationError) Key() bool
- func (e DefaultSocketInterfaceValidationError) Reason() string
- type IoUringOptions
- func (*IoUringOptions) Descriptor() ([]byte, []int)deprecated
- func (x *IoUringOptions) GetEnableMultishotReceive() bool
- func (x *IoUringOptions) GetEnableSubmissionQueuePolling() bool
- func (x *IoUringOptions) GetIoUringSize() *wrapperspb.UInt32Value
- func (x *IoUringOptions) GetReadBufferSize() *wrapperspb.UInt32Value
- func (x *IoUringOptions) GetWriteHighWatermarkBytes() *wrapperspb.UInt32Value
- func (x *IoUringOptions) GetWriteLowWatermarkBytes() *wrapperspb.UInt32Value
- func (x *IoUringOptions) GetWriteTimeoutMs() *wrapperspb.UInt32Value
- func (*IoUringOptions) ProtoMessage()
- func (x *IoUringOptions) ProtoReflect() protoreflect.Message
- func (x *IoUringOptions) Reset()
- func (x *IoUringOptions) String() string
- func (m *IoUringOptions) Validate() error
- func (m *IoUringOptions) ValidateAll() error
- type IoUringOptionsMultiError
- type IoUringOptionsValidationError
- func (e IoUringOptionsValidationError) Cause() error
- func (e IoUringOptionsValidationError) Error() string
- func (e IoUringOptionsValidationError) ErrorName() string
- func (e IoUringOptionsValidationError) Field() string
- func (e IoUringOptionsValidationError) Key() bool
- func (e IoUringOptionsValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DefaultSocketInterface ¶
type DefaultSocketInterface struct {
// Options for “io_uring“-based socket I/O. “io_uring“ is only supported on Linux with
// kernel version 5.11 or later. On unsupported platforms, Envoy falls back to the default
// socket API.
//
// .. note::
//
// If not set, “io_uring“ will not be enabled and the standard epoll-based I/O path
// is used.
IoUringOptions *IoUringOptions `protobuf:"bytes,1,opt,name=io_uring_options,json=ioUringOptions,proto3" json:"io_uring_options,omitempty"`
// contains filtered or unexported fields
}
Configuration for the default socket interface that relies on OS-dependent syscalls to create sockets.
func (*DefaultSocketInterface) Descriptor
deprecated
func (*DefaultSocketInterface) Descriptor() ([]byte, []int)
Deprecated: Use DefaultSocketInterface.ProtoReflect.Descriptor instead.
func (*DefaultSocketInterface) GetIoUringOptions ¶ added in v1.35.0
func (x *DefaultSocketInterface) GetIoUringOptions() *IoUringOptions
func (*DefaultSocketInterface) ProtoMessage ¶
func (*DefaultSocketInterface) ProtoMessage()
func (*DefaultSocketInterface) ProtoReflect ¶
func (x *DefaultSocketInterface) ProtoReflect() protoreflect.Message
func (*DefaultSocketInterface) Reset ¶
func (x *DefaultSocketInterface) Reset()
func (*DefaultSocketInterface) String ¶
func (x *DefaultSocketInterface) String() string
func (*DefaultSocketInterface) Validate ¶
func (m *DefaultSocketInterface) Validate() error
Validate checks the field values on DefaultSocketInterface with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DefaultSocketInterface) ValidateAll ¶
func (m *DefaultSocketInterface) ValidateAll() error
ValidateAll checks the field values on DefaultSocketInterface with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DefaultSocketInterfaceMultiError, or nil if none found.
type DefaultSocketInterfaceMultiError ¶
type DefaultSocketInterfaceMultiError []error
DefaultSocketInterfaceMultiError is an error wrapping multiple validation errors returned by DefaultSocketInterface.ValidateAll() if the designated constraints aren't met.
func (DefaultSocketInterfaceMultiError) AllErrors ¶
func (m DefaultSocketInterfaceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DefaultSocketInterfaceMultiError) Error ¶
func (m DefaultSocketInterfaceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DefaultSocketInterfaceValidationError ¶
type DefaultSocketInterfaceValidationError struct {
// contains filtered or unexported fields
}
DefaultSocketInterfaceValidationError is the validation error returned by DefaultSocketInterface.Validate if the designated constraints aren't met.
func (DefaultSocketInterfaceValidationError) Cause ¶
func (e DefaultSocketInterfaceValidationError) Cause() error
Cause function returns cause value.
func (DefaultSocketInterfaceValidationError) Error ¶
func (e DefaultSocketInterfaceValidationError) Error() string
Error satisfies the builtin error interface
func (DefaultSocketInterfaceValidationError) ErrorName ¶
func (e DefaultSocketInterfaceValidationError) ErrorName() string
ErrorName returns error name.
func (DefaultSocketInterfaceValidationError) Field ¶
func (e DefaultSocketInterfaceValidationError) Field() string
Field function returns field value.
func (DefaultSocketInterfaceValidationError) Key ¶
func (e DefaultSocketInterfaceValidationError) Key() bool
Key function returns key value.
func (DefaultSocketInterfaceValidationError) Reason ¶
func (e DefaultSocketInterfaceValidationError) Reason() string
Reason function returns reason value.
type IoUringOptions ¶ added in v1.35.0
type IoUringOptions struct {
// The number of entries in the “io_uring“ submission queue (SQ). Each in-flight I/O
// operation requires one SQE. The completion queue (CQ) is sized at “2x“ this value
// to provide overflow headroom. If not specified, defaults to 1000.
IoUringSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=io_uring_size,json=ioUringSize,proto3" json:"io_uring_size,omitempty"`
// Enables “io_uring“ submission queue polling (“SQPOLL“). When enabled, a dedicated
// kernel thread polls the SQ for new entries, eliminating the “io_uring_enter()“ syscall
// on submission. This may reduce latency at the cost of increased CPU usage.
// If not specified, defaults to false.
EnableSubmissionQueuePolling bool `` /* 150-byte string literal not displayed */
// The starting size in bytes of the buffer for each “readv“-based “io_uring“ read. Envoy
// grows the next read up to 16 times this size while reads keep filling the buffer and resets it
// otherwise, so large transfers use fewer reads. When “enable_multishot_receive“ is set, this
// is also the size of each kernel-provided buffer. If not specified, defaults to 8192.
ReadBufferSize *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=read_buffer_size,json=readBufferSize,proto3" json:"read_buffer_size,omitempty"`
// The timeout in milliseconds to wait for pending write operations to complete when closing
// a socket. “io_uring“ writes are asynchronous. If the remote peer stops reading, a write
// may never complete. After this timeout, pending writes are canceled and the socket is
// closed. If not specified, defaults to 1000.
WriteTimeoutMs *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=write_timeout_ms,json=writeTimeoutMs,proto3" json:"write_timeout_ms,omitempty"`
// The high watermark in bytes for the write buffer. When the amount of pending write data
// exceeds this threshold, the socket stops accepting new writes from the connection so that
// backpressure propagates to the upper layers. If not specified, defaults to 131072 (128 KiB).
// When set, the value must be at least 4096 (4 KiB).
WriteHighWatermarkBytes *wrapperspb.UInt32Value `` /* 134-byte string literal not displayed */
// The low watermark in bytes for the write buffer. After the buffer has exceeded
// “write_high_watermark_bytes“ and writes were paused, the socket resumes accepting writes
// once the pending write data drops to or below this value.
// If not specified, defaults to 16384 (16 KiB).
// When set, the value must be at least 1024 (1 KiB).
//
// .. note::
//
// This value must be less than “write_high_watermark_bytes“. If misconfigured, it is
// clamped to “write_high_watermark_bytes / 2“.
WriteLowWatermarkBytes *wrapperspb.UInt32Value `` /* 131-byte string literal not displayed */
// Enables “multishot“ reads backed by a kernel-provided buffer ring. A single “recv“ is armed
// per socket and the kernel keeps delivering data as it arrives without a new submission per
// read, which reduces event loop wakeups and read submissions for read-heavy workloads. The ring
// holds “io_uring_size“ buffers rounded up to a power of two and capped at 4096, each
// “read_buffer_size“ bytes, so each worker thread uses up to that buffer count times
// “read_buffer_size“ bytes for the pool. Requires Linux kernel 6.0 or later. On older kernels,
// Envoy falls back to “readv“-based reads. If not specified, defaults to false.
EnableMultishotReceive bool `` /* 130-byte string literal not displayed */
// contains filtered or unexported fields
}
Configuration for “io_uring“-based asynchronous I/O.
Each worker thread creates its own “io_uring“ instance during initialization. Operations are submitted to the submission queue (SQ) and completions are reaped from the completion queue (CQ) via an eventfd integrated with the worker's event loop.
.. warning::
``io_uring`` support is experimental and its performance characteristics depend heavily on the kernel version.
[#next-free-field: 8]
func (*IoUringOptions) Descriptor
deprecated
added in
v1.35.0
func (*IoUringOptions) Descriptor() ([]byte, []int)
Deprecated: Use IoUringOptions.ProtoReflect.Descriptor instead.
func (*IoUringOptions) GetEnableMultishotReceive ¶ added in v1.39.0
func (x *IoUringOptions) GetEnableMultishotReceive() bool
func (*IoUringOptions) GetEnableSubmissionQueuePolling ¶ added in v1.35.0
func (x *IoUringOptions) GetEnableSubmissionQueuePolling() bool
func (*IoUringOptions) GetIoUringSize ¶ added in v1.35.0
func (x *IoUringOptions) GetIoUringSize() *wrapperspb.UInt32Value
func (*IoUringOptions) GetReadBufferSize ¶ added in v1.35.0
func (x *IoUringOptions) GetReadBufferSize() *wrapperspb.UInt32Value
func (*IoUringOptions) GetWriteHighWatermarkBytes ¶ added in v1.39.0
func (x *IoUringOptions) GetWriteHighWatermarkBytes() *wrapperspb.UInt32Value
func (*IoUringOptions) GetWriteLowWatermarkBytes ¶ added in v1.39.0
func (x *IoUringOptions) GetWriteLowWatermarkBytes() *wrapperspb.UInt32Value
func (*IoUringOptions) GetWriteTimeoutMs ¶ added in v1.35.0
func (x *IoUringOptions) GetWriteTimeoutMs() *wrapperspb.UInt32Value
func (*IoUringOptions) ProtoMessage ¶ added in v1.35.0
func (*IoUringOptions) ProtoMessage()
func (*IoUringOptions) ProtoReflect ¶ added in v1.35.0
func (x *IoUringOptions) ProtoReflect() protoreflect.Message
func (*IoUringOptions) Reset ¶ added in v1.35.0
func (x *IoUringOptions) Reset()
func (*IoUringOptions) String ¶ added in v1.35.0
func (x *IoUringOptions) String() string
func (*IoUringOptions) Validate ¶ added in v1.35.0
func (m *IoUringOptions) Validate() error
Validate checks the field values on IoUringOptions with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*IoUringOptions) ValidateAll ¶ added in v1.35.0
func (m *IoUringOptions) ValidateAll() error
ValidateAll checks the field values on IoUringOptions with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in IoUringOptionsMultiError, or nil if none found.
type IoUringOptionsMultiError ¶ added in v1.35.0
type IoUringOptionsMultiError []error
IoUringOptionsMultiError is an error wrapping multiple validation errors returned by IoUringOptions.ValidateAll() if the designated constraints aren't met.
func (IoUringOptionsMultiError) AllErrors ¶ added in v1.35.0
func (m IoUringOptionsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (IoUringOptionsMultiError) Error ¶ added in v1.35.0
func (m IoUringOptionsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type IoUringOptionsValidationError ¶ added in v1.35.0
type IoUringOptionsValidationError struct {
// contains filtered or unexported fields
}
IoUringOptionsValidationError is the validation error returned by IoUringOptions.Validate if the designated constraints aren't met.
func (IoUringOptionsValidationError) Cause ¶ added in v1.35.0
func (e IoUringOptionsValidationError) Cause() error
Cause function returns cause value.
func (IoUringOptionsValidationError) Error ¶ added in v1.35.0
func (e IoUringOptionsValidationError) Error() string
Error satisfies the builtin error interface
func (IoUringOptionsValidationError) ErrorName ¶ added in v1.35.0
func (e IoUringOptionsValidationError) ErrorName() string
ErrorName returns error name.
func (IoUringOptionsValidationError) Field ¶ added in v1.35.0
func (e IoUringOptionsValidationError) Field() string
Field function returns field value.
func (IoUringOptionsValidationError) Key ¶ added in v1.35.0
func (e IoUringOptionsValidationError) Key() bool
Key function returns key value.
func (IoUringOptionsValidationError) Reason ¶ added in v1.35.0
func (e IoUringOptionsValidationError) Reason() string
Reason function returns reason value.