epp

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultRespBodyBufBudget = 1 << 20 // 1MB

DefaultRespBodyBufBudget is default byte budget for buffering response body chunks not yet consumed by EPP.

Variables

This section is empty.

Functions

func BuildEnvoyGRPCHeaders

func BuildEnvoyGRPCHeaders(header http.Header, rawValue bool, endofstream bool) *pb.HttpHeaders

func BuildTLSConfig added in v1.8.7

func BuildTLSConfig(insecureSkip bool, caFile string) (*tls.Config, error)

BuildTLSConfig builds client TLS config for EPP connections.

func NewGrpcConn added in v1.8.7

func NewGrpcConn(addr string, connectTimeout time.Duration, insecureSkip bool, caFile string, plaintext bool) (*grpc.ClientConn, error)

NewGrpcConn dials a long-lived EPP data connection. The connection is lazy: it is established on first use and multiplexes all streams of this address. connectTimeout bounds the connect handshake (grpc.WithConnectParams). plaintext=true dials without TLS (EPP serves plaintext gRPC), in which case insecureSkip/caFile are ignored. Caller owns the returned conn and must Close it when done.

Types

type EppClient

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

func NewEppClient

func NewEppClient(conn *grpc.ClientConn, callTimeout time.Duration, opts ...EppClientOption) (*EppClient, error)

NewEppClient creates an EPP stream client on given connection. callTimeout limits the first message (RequestHeaders Send+Recv) round trip. The conn is NOT owned by EppClient: Close only tears down this stream and its goroutines, so a conn shared by many streams (one per request) is never closed by an individual stream teardown.

func (*EppClient) Close

func (c *EppClient) Close()

Close tears down this stream (response forwarding goroutines included) and releases stream resources. It never closes the shared *grpc.ClientConn.

func (*EppClient) CloseRespBody

func (c *EppClient) CloseRespBody()

func (*EppClient) ProcRespBody

func (c *EppClient) ProcRespBody(d []byte)

ProcRespBody buffers a response body chunk for EPP. Buffering is bounded by a byte budget: on overflow the whole remaining body of this stream is skipped (with counter and one log line), instead of silently dropping individual chunks. Never blocks the response forwarding path.

func (*EppClient) ProcRespHeader

func (c *EppClient) ProcRespHeader(header http.Header, endofstream bool)

func (*EppClient) Recv

func (*EppClient) RecvTimeout added in v1.8.7

func (c *EppClient) RecvTimeout(timeout time.Duration) (*extprocv3.ProcessingResponse, error)

RecvTimeout receives next message with timeout. On timeout the stream is left in unknown state; caller must Close the client.

func (*EppClient) RespBodyAborted added in v1.8.7

func (c *EppClient) RespBodyAborted() bool

RespBodyAborted reports whether response body was skipped due to overflow.

func (*EppClient) Send

type EppClientOption added in v1.8.7

type EppClientOption func(*EppClient)

EppClientOption customizes EppClient.

func WithRespBodyBufBudget added in v1.8.7

func WithRespBodyBufBudget(budget int) EppClientOption

WithRespBodyBufBudget sets byte budget of response body buffer.

type EppResponseBodyFilter

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

func NewEppResponseBodyFilter

func NewEppResponseBodyFilter(source io.ReadCloser, c *EppClient) *EppResponseBodyFilter

func (*EppResponseBodyFilter) Close

func (f *EppResponseBodyFilter) Close() error

func (*EppResponseBodyFilter) Read

func (f *EppResponseBodyFilter) Read(p []byte) (n int, err error)

type EppState added in v1.8.7

type EppState struct {
	// RespBodyOverflow counts streams whose response body overflowed the
	// bounded buffer and was skipped (see ProcRespBody).
	RespBodyOverflow *metrics.Counter
}

EppState is monitor state of EPP client.

func GetEppState added in v1.8.7

func GetEppState() *EppState

Jump to

Keyboard shortcuts

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