package
1.20240719.1
Repository: https://github.com/blend/go-sdk.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BackoffExponential produces increasing intervals for each attempt.
BackoffExponentialWithJitter creates an exponential backoff like BackoffExponential does, but adds jitter.
BackoffLinear is very simple: it waits for a fixed period of time between calls.
BackoffLinearWithJitter waits a set period of time, allowing for jitter (fractional adjustment).
CheckConnectivityState returns an async checker for a client that provides a connection state.
CreateListener creates a net listener for a given bind address.
ExponentBase2 computes 2^(a-1) where a >= 1.
GetClientCommonName fetches the client common name from the context.
GetMethod returns the rpc method from the context.
JitterUp adds random jitter to the duration.
LoggedClientStream returns a stream server interceptor.
LoggedClientUnary returns a unary client interceptor.
LoggedRecoveryHandler is a recovery handler shim.
LoggedServerStream returns a stream server interceptor.
LoggedServerUnary returns a unary server interceptor.
MetaValue returns a value from a metadata set.
NewGraceful returns a new graceful host for a grpc server.
NewRPCEvent creates a new rpc event.
NewRPCEventFilter returns a new rpc event filter.
NewRPCEventListener returns a new web request event listener.
NewRPCStreamMessageEvent creates a new rpc stream message event.
NewRPCStreamMessageEventFilter returns a new rpc stream message event filter.
NewRPCStreamMessageEventListener returns a new rpc stream message event event listener.
OptRetryCheckConnectivityStateMaxRetries sets the MaxRetries.
OptRetryCheckConnectivityStateRetryBackoff sets the RetryBackoff.
OptRetryCheckConnectivityStateRetryTimeout sets the RetryTimeout.
OptRPCAuthority sets a field on the event.
OptRPCContentType sets a field on the event.
OptRPCElapsed sets a field on the event.
OptRPCEngine sets a field on the event.
OptRPCErr sets a field on the event.
OptRPCMethod sets a field on the event.
OptRPCPeer sets a field on the event.
OptRPCStreamMessageAuthority sets a field on the event.
OptRPCStreamMessageContentType sets a field on the event.
OptRPCStreamMessageDirection sets a field on the event.
OptRPCStreamMessageElapsed sets a field on the event.
OptRPCStreamMessageEngine sets a field on the event.
OptRPCStreamMessageErr sets a field on the event.
OptRPCStreamMessageMethod sets a field on the event.
OptRPCStreamMessagePeer sets a field on the event.
OptRPCStreamMessageUserAgent sets a field on the event.
OptRPCUserAgent sets a field on the event.
RecoverServerStream returns a new streaming server interceptor for panic recovery.
RecoverServerUnary returns a new unary server interceptor for panic recovery.
RetryCheckConnectivityState implements a retry checker for connectivity state.
RetryStreamClientInterceptor returns a new retrying stream client interceptor for server side streaming calls.
RetryUnaryClientInterceptor returns a new retrying unary client interceptor.
StreamClientChain creates a single interceptor out of a chain of many interceptors.
StreamServerChain reads the middleware variadic args and organizes the calls recursively in the order they appear.
TracedClientStream implements the stream client interceptor based on a tracer.
TracedClientUnary implements the unary client interceptor based on a tracer.
TracedServerStream returns a grpc streaming interceptor.
TracedServerUnary returns a unary server interceptor.
UnaryClientChain creates a single interceptor out of a chain of many interceptors.
UnaryClientTimeout returns a unary client interceptor.
UnaryServerChain reads the middleware variadic args and organizes the calls recursively in the order they appear.
WithClientCommonName adds a client common name to a context as a value.
WithClientRetries sets the maximum number of retries on this call, or this interceptor.
WithClientRetryBackoffContext sets the `BackoffFuncContext` used to control time between retries.
WithClientRetryBackoffFunc sets the `ClientRetryBackoffFunc` used to control time between retries.
WithClientRetryBackoffLinear sets the retry backoff to a fixed duration.
WithClientRetryCodes sets which codes should be retried.
WithClientRetryPerRetryTimeout sets the RPC timeout per call (including initial call) on this call, or this interceptor.
WithMethod adds a method to a context as a value.
WithRetriesDisabled disables the retry behavior on this call, or this interceptor.
WithServerRecoveryHandler customizes the function for recovering from a panic.

# Constants

Our default engine.
ErrConnectionNotReady is returned by ConnectivityStateChecker.
Logger flags.
Logger flags.
Metadata Keys.
MetaTags These are common tags found in the metadata for rpc calls, both unary and streaming.
MetaTags These are common tags found in the metadata for rpc calls, both unary and streaming.
MetaTags These are common tags found in the metadata for rpc calls, both unary and streaming.
constants.
constants.

# Variables

DefaultRetriableCodes is a set of well known types gRPC codes that should be retri-able.

# Structs

CallOption is a grpc.CallOption that is local to grpc_retry.
Graceful is a shim for graceful hosting grpc servers.
RetryCheckConnectivityStateOptions are options for checking the connectivity state.
RPCEvent is an event type for rpc.
RPCStreamMessageEvent is an event type for rpc.

# Interfaces

ClientTracer is a type that starts traces.
ConnectionStateProvider is a type that provides a connection state.
ServerTracer is a type that starts traces.
TraceFinisher is a finisher for traces.
Tracer is the full tracer.

# Type aliases

BackoffFunc denotes a family of functions that control the backoff duration between call retries.
BackoffFuncContext denotes a family of functions that control the backoff duration between call retries.
RecoveryHandlerFunc is a function that recovers from the panic `p` by returning an `error`.
RetryCheckConnectivityStateOption mutates CheckConnectivityStateOptions.
RPCEventOption is a mutator for RPCEvents.
RPCStreamMessageEventOption is a mutator for RPCEvents.
ServerRecoveryOption is a type that provides a recovery option.
StreamMessageDirection is the direction the message was sent.