package network_ext_procv3

import "github.com/envoyproxy/go-control-plane/envoy/service/network_ext_proc/v3"

Index

Constants

const (
	NetworkExternalProcessor_Process_FullMethodName = "/envoy.service.network_ext_proc.v3.NetworkExternalProcessor/Process"
)

Variables

var (
	ProcessingResponse_DataProcessedStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "UNMODIFIED",
		2: "MODIFIED",
	}
	ProcessingResponse_DataProcessedStatus_value = map[string]int32{
		"UNKNOWN":    0,
		"UNMODIFIED": 1,
		"MODIFIED":   2,
	}
)

Enum value maps for ProcessingResponse_DataProcessedStatus.

var (
	ProcessingResponse_ConnectionStatus_name = map[int32]string{
		0: "CONTINUE",
		1: "CLOSE",
		2: "CLOSE_RST",
	}
	ProcessingResponse_ConnectionStatus_value = map[string]int32{
		"CONTINUE":  0,
		"CLOSE":     1,
		"CLOSE_RST": 2,
	}
)

Enum value maps for ProcessingResponse_ConnectionStatus.

var File_envoy_service_network_ext_proc_v3_network_external_processor_proto protoreflect.FileDescriptor
var NetworkExternalProcessor_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "envoy.service.network_ext_proc.v3.NetworkExternalProcessor",
	HandlerType: (*NetworkExternalProcessorServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Process",
			Handler:       _NetworkExternalProcessor_Process_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "envoy/service/network_ext_proc/v3/network_external_processor.proto",
}

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

Functions

func RegisterNetworkExternalProcessorServer

func RegisterNetworkExternalProcessorServer(s grpc.ServiceRegistrar, srv NetworkExternalProcessorServer)

Types

type Data

type Data struct {

	// The raw payload data
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Indicates whether this is the last data frame in the current direction.
	// The external processor should still respond to this message even
	// if there is no more data expected in this direction.
	EndOfStream bool `protobuf:"varint,2,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"`
	// contains filtered or unexported fields
}

The payload data from network layer

func (*Data) Descriptor

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetData

func (x *Data) GetData() []byte

func (*Data) GetEndOfStream

func (x *Data) GetEndOfStream() bool

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

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

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

func (*Data) Validate

func (m *Data) Validate() error

Validate checks the field values on Data 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 (*Data) ValidateAll

func (m *Data) ValidateAll() error

ValidateAll checks the field values on Data 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 DataMultiError, or nil if none found.

type DataMultiError

type DataMultiError []error

DataMultiError is an error wrapping multiple validation errors returned by Data.ValidateAll() if the designated constraints aren't met.

func (DataMultiError) AllErrors

func (m DataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DataMultiError) Error

func (m DataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DataValidationError

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

DataValidationError is the validation error returned by Data.Validate if the designated constraints aren't met.

func (DataValidationError) Cause

func (e DataValidationError) Cause() error

Cause function returns cause value.

func (DataValidationError) Error

func (e DataValidationError) Error() string

Error satisfies the builtin error interface

func (DataValidationError) ErrorName

func (e DataValidationError) ErrorName() string

ErrorName returns error name.

func (DataValidationError) Field

func (e DataValidationError) Field() string

Field function returns field value.

func (DataValidationError) Key

func (e DataValidationError) Key() bool

Key function returns key value.

func (DataValidationError) Reason

func (e DataValidationError) Reason() string

Reason function returns reason value.

type NetworkExternalProcessorClient

type NetworkExternalProcessorClient interface {
	// Process establishes a bidirectional stream between Envoy and the external
	// processing server. Envoy sends ProcessingRequests containing network data
	// and the server responds with ProcessingResponses containing processing
	// decisions and potentially modified data.
	//
	// The server should handle processing timeout properly to avoid blocking
	// network traffic for extended periods. Any uncaught exceptions will
	// be treated as errors and will terminate the stream.
	//
	// Implementation note: The server should process requests in the order
	// they are received to maintain proper sequencing of network traffic.
	Process(ctx context.Context, opts ...grpc.CallOption) (NetworkExternalProcessor_ProcessClient, error)
}

NetworkExternalProcessorClient is the client API for NetworkExternalProcessor 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 NewNetworkExternalProcessorClient

func NewNetworkExternalProcessorClient(cc grpc.ClientConnInterface) NetworkExternalProcessorClient

type NetworkExternalProcessorServer

type NetworkExternalProcessorServer interface {
	// Process establishes a bidirectional stream between Envoy and the external
	// processing server. Envoy sends ProcessingRequests containing network data
	// and the server responds with ProcessingResponses containing processing
	// decisions and potentially modified data.
	//
	// The server should handle processing timeout properly to avoid blocking
	// network traffic for extended periods. Any uncaught exceptions will
	// be treated as errors and will terminate the stream.
	//
	// Implementation note: The server should process requests in the order
	// they are received to maintain proper sequencing of network traffic.
	Process(NetworkExternalProcessor_ProcessServer) error
}

NetworkExternalProcessorServer is the server API for NetworkExternalProcessor service. All implementations should embed UnimplementedNetworkExternalProcessorServer for forward compatibility

type NetworkExternalProcessor_ProcessClient

type NetworkExternalProcessor_ProcessClient interface {
	Send(*ProcessingRequest) error
	Recv() (*ProcessingResponse, error)
	grpc.ClientStream
}

type NetworkExternalProcessor_ProcessServer

type NetworkExternalProcessor_ProcessServer interface {
	Send(*ProcessingResponse) error
	Recv() (*ProcessingRequest, error)
	grpc.ServerStream
}

type ProcessingRequest

type ProcessingRequest struct {

	// ReadData contains the network data intercepted in the request path (client to server).
	// This is sent to the external processor when data arrives from the downstream client.
	// If this is set, write_data should not be set.
	ReadData *Data `protobuf:"bytes,1,opt,name=read_data,json=readData,proto3" json:"read_data,omitempty"`
	// WriteData contains the network data intercepted in the response path (server to client).
	// This is sent to the external processor when data arrives from the upstream server.
	// If this is set, read_data should not be set.
	WriteData *Data `protobuf:"bytes,2,opt,name=write_data,json=writeData,proto3" json:"write_data,omitempty"`
	// Optional metadata associated with the request.
	// This can include connection properties, filter configuration, and any other
	// contextual information that might be useful for processing decisions.
	//
	// The metadata is not automatically propagated from request to response.
	// The external processor must include any needed metadata in its response.
	Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

ProcessingRequest contains data sent from Envoy to the external processing server. Each request contains either read data (from client) or write data (to client) along with optional metadata.

func (*ProcessingRequest) Descriptor

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

Deprecated: Use ProcessingRequest.ProtoReflect.Descriptor instead.

func (*ProcessingRequest) GetMetadata

func (x *ProcessingRequest) GetMetadata() *v3.Metadata

func (*ProcessingRequest) GetReadData

func (x *ProcessingRequest) GetReadData() *Data

func (*ProcessingRequest) GetWriteData

func (x *ProcessingRequest) GetWriteData() *Data

func (*ProcessingRequest) ProtoMessage

func (*ProcessingRequest) ProtoMessage()

func (*ProcessingRequest) ProtoReflect

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

func (*ProcessingRequest) Reset

func (x *ProcessingRequest) Reset()

func (*ProcessingRequest) String

func (x *ProcessingRequest) String() string

func (*ProcessingRequest) Validate

func (m *ProcessingRequest) Validate() error

Validate checks the field values on ProcessingRequest 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 (*ProcessingRequest) ValidateAll

func (m *ProcessingRequest) ValidateAll() error

ValidateAll checks the field values on ProcessingRequest 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 ProcessingRequestMultiError, or nil if none found.

type ProcessingRequestMultiError

type ProcessingRequestMultiError []error

ProcessingRequestMultiError is an error wrapping multiple validation errors returned by ProcessingRequest.ValidateAll() if the designated constraints aren't met.

func (ProcessingRequestMultiError) AllErrors

func (m ProcessingRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ProcessingRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ProcessingRequestValidationError

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

ProcessingRequestValidationError is the validation error returned by ProcessingRequest.Validate if the designated constraints aren't met.

func (ProcessingRequestValidationError) Cause

Cause function returns cause value.

func (ProcessingRequestValidationError) Error

Error satisfies the builtin error interface

func (ProcessingRequestValidationError) ErrorName

ErrorName returns error name.

func (ProcessingRequestValidationError) Field

Field function returns field value.

func (ProcessingRequestValidationError) Key

Key function returns key value.

func (ProcessingRequestValidationError) Reason

Reason function returns reason value.

type ProcessingResponse

type ProcessingResponse struct {

	// The processed ReadData containing potentially modified data for the request path.
	// This should be sent in response to a ProcessingRequest with read_data, and the
	// previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane.
	// If this is set, write_data should not be set.
	ReadData *Data `protobuf:"bytes,1,opt,name=read_data,json=readData,proto3" json:"read_data,omitempty"`
	// The processed WriteData containing potentially modified data for the response path.
	// This should be sent in response to a ProcessingRequest with write_data, and the
	// previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane.
	// If this is set, read_data should not be set.
	WriteData *Data `protobuf:"bytes,2,opt,name=write_data,json=writeData,proto3" json:"write_data,omitempty"`
	// Indicates whether the data was modified or not.
	// This is mandatory and tells Envoy whether to use the original or modified data.
	DataProcessingStatus ProcessingResponse_DataProcessedStatus `protobuf:"varint,3,opt,name=data_processing_status,json=dataProcessingStatus,proto3,enum=envoy.service.network_ext_proc.v3.ProcessingResponse_DataProcessedStatus" json:"data_processing_status,omitempty"`
	// Optional: Determines the connection behavior after processing.
	// If not specified, CONTINUE is assumed, and the connection proceeds normally.
	// Use CLOSE or CLOSE_RST to terminate the connection based on processing results.
	ConnectionStatus ProcessingResponse_ConnectionStatus `protobuf:"varint,4,opt,name=connection_status,json=connectionStatus,proto3,enum=envoy.service.network_ext_proc.v3.ProcessingResponse_ConnectionStatus" json:"connection_status,omitempty"`
	// Optional metadata associated with the request.
	// This can include connection properties, filter configuration, and any other
	// contextual information that might be useful for processing decisions.
	//
	// The metadata is not automatically propagated from request to response.
	// The external processor must include any needed metadata in its response.
	DynamicMetadata *structpb.Struct `protobuf:"bytes,5,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"`
	// contains filtered or unexported fields
}

ProcessingResponse contains the response from the external processing server to Envoy. Each response corresponds to a ProcessingRequest and indicates how the network traffic should be handled. [#next-free-field: 6]

func (*ProcessingResponse) Descriptor

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

Deprecated: Use ProcessingResponse.ProtoReflect.Descriptor instead.

func (*ProcessingResponse) GetConnectionStatus

func (*ProcessingResponse) GetDataProcessingStatus

func (x *ProcessingResponse) GetDataProcessingStatus() ProcessingResponse_DataProcessedStatus

func (*ProcessingResponse) GetDynamicMetadata

func (x *ProcessingResponse) GetDynamicMetadata() *structpb.Struct

func (*ProcessingResponse) GetReadData

func (x *ProcessingResponse) GetReadData() *Data

func (*ProcessingResponse) GetWriteData

func (x *ProcessingResponse) GetWriteData() *Data

func (*ProcessingResponse) ProtoMessage

func (*ProcessingResponse) ProtoMessage()

func (*ProcessingResponse) ProtoReflect

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

func (*ProcessingResponse) Reset

func (x *ProcessingResponse) Reset()

func (*ProcessingResponse) String

func (x *ProcessingResponse) String() string

func (*ProcessingResponse) Validate

func (m *ProcessingResponse) Validate() error

Validate checks the field values on ProcessingResponse 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 (*ProcessingResponse) ValidateAll

func (m *ProcessingResponse) ValidateAll() error

ValidateAll checks the field values on ProcessingResponse 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 ProcessingResponseMultiError, or nil if none found.

type ProcessingResponseMultiError

type ProcessingResponseMultiError []error

ProcessingResponseMultiError is an error wrapping multiple validation errors returned by ProcessingResponse.ValidateAll() if the designated constraints aren't met.

func (ProcessingResponseMultiError) AllErrors

func (m ProcessingResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ProcessingResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type ProcessingResponseValidationError

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

ProcessingResponseValidationError is the validation error returned by ProcessingResponse.Validate if the designated constraints aren't met.

func (ProcessingResponseValidationError) Cause

Cause function returns cause value.

func (ProcessingResponseValidationError) Error

Error satisfies the builtin error interface

func (ProcessingResponseValidationError) ErrorName

ErrorName returns error name.

func (ProcessingResponseValidationError) Field

Field function returns field value.

func (ProcessingResponseValidationError) Key

Key function returns key value.

func (ProcessingResponseValidationError) Reason

Reason function returns reason value.

type ProcessingResponse_ConnectionStatus

type ProcessingResponse_ConnectionStatus int32

ConnectionStatus determines what happens to the connection after processing.

const (
	// Continue normal processing of the connection.
	// This is the default behavior and allows traffic to flow normally.
	ProcessingResponse_CONTINUE ProcessingResponse_ConnectionStatus = 0
	// Close the connection with normal TCP FIN.
	// This allows for clean connection termination with a normal close sequence.
	// Any buffered data will be sent before closing.
	ProcessingResponse_CLOSE ProcessingResponse_ConnectionStatus = 1
	// Immediately reset the connection with TCP RST.
	// This forcibly terminates the connection without a clean shutdown,
	// discarding any buffered data. Use this for security-critical situations
	// or when immediate termination is required.
	ProcessingResponse_CLOSE_RST ProcessingResponse_ConnectionStatus = 2
)

func (ProcessingResponse_ConnectionStatus) Descriptor

func (ProcessingResponse_ConnectionStatus) Enum

func (ProcessingResponse_ConnectionStatus) EnumDescriptor

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

Deprecated: Use ProcessingResponse_ConnectionStatus.Descriptor instead.

func (ProcessingResponse_ConnectionStatus) Number

func (ProcessingResponse_ConnectionStatus) String

func (ProcessingResponse_ConnectionStatus) Type

type ProcessingResponse_DataProcessedStatus

type ProcessingResponse_DataProcessedStatus int32

DataProcessedStatus indicates whether the data was modified by the external processor.

const (
	// The data processed status is unknown.
	ProcessingResponse_UNKNOWN ProcessingResponse_DataProcessedStatus = 0
	// The data remains unchanged. Envoy will use the original data.
	// This is useful when the processor only wants to inspect but not modify the traffic.
	ProcessingResponse_UNMODIFIED ProcessingResponse_DataProcessedStatus = 1
	// The data has been modified. Envoy will use the modified data provided in the response.
	// This allows the processor to transform the network traffic as needed.
	ProcessingResponse_MODIFIED ProcessingResponse_DataProcessedStatus = 2
)

func (ProcessingResponse_DataProcessedStatus) Descriptor

func (ProcessingResponse_DataProcessedStatus) Enum

func (ProcessingResponse_DataProcessedStatus) EnumDescriptor

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

Deprecated: Use ProcessingResponse_DataProcessedStatus.Descriptor instead.

func (ProcessingResponse_DataProcessedStatus) Number

func (ProcessingResponse_DataProcessedStatus) String

func (ProcessingResponse_DataProcessedStatus) Type

type UnimplementedNetworkExternalProcessorServer

type UnimplementedNetworkExternalProcessorServer struct {
}

UnimplementedNetworkExternalProcessorServer should be embedded to have forward compatible implementations.

func (UnimplementedNetworkExternalProcessorServer) Process

type UnsafeNetworkExternalProcessorServer

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

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

Source Files

network_external_processor.pb.go network_external_processor.pb.validate.go network_external_processor_grpc.pb.go

Version
v1.37.0 (latest)
Published
Jan 13, 2026
Platform
linux/amd64
Imports
25 packages
Last checked
1 hour ago

Tools for package owners.