package
0.0.0-20241118092146-e14b3c000036
Repository: https://github.com/lolizeppelin/micro.git
Documentation: pkg.go.dev
# Functions
Backoff is used to set the backoff function used when retrying Calls.
No description provided by the author
DialTimeout sets the transport dial timeout.
FromService wraps a client to inject service and auth metadata.
No description provided by the author
NewOptions creates new Client options.
No description provided by the author
PoolSize sets the connection pool size.
PoolTTL sets the connection pool ttl.
No description provided by the author
RequestTimeout set the request timeout.
Retries set the number of retries when making the request.
Retry sets the retry function to be used when re-trying.
RetryAlways always retry on error.
RetryOnError retries a request on a 500 or timeout error.
No description provided by the author
StreamTimeout sets the stream timeout.
WithBackoff is a CallOption which overrides that which set in Options.CallOptions.
WithCallWrapper is a CallOption which adds to the existing CallFunc wrappers.
WithConnClose sets the Connection header to close.
WithDialTimeout is a CallOption which overrides that which set in Options.CallOptions.
No description provided by the author
WithRequestTimeout is a CallOption which overrides that which set in Options.CallOptions.
WithRetries sets the number of tries for a call.
WithRetry is a CallOption which overrides that which set in Options.CallOptions.
No description provided by the author
WithServiceToken is a CallOption which overrides the authorization header with the services own auth token.
WithStreamTimeout sets the stream timeout.
No description provided by the author
Adds a Wrapper to a list of options passed into the client.
Adds a Wrapper to the list of CallFunc wrappers.
# Constants
DefaultPoolSize sets the connection pool size.
DefaultPoolTTL sets the connection pool ttl.
DefaultRequestTimeout is the default request timeout.
DefaultRetries is the default number of times a request is tried.
# Variables
DefaultBackoff is the default backoff function for retries.
DefaultRetry is the default check-for-retry function for retries.
# Structs
CallOptions are options used to make calls to a server.
Options are the Client options.
# Type aliases
No description provided by the author
CallFunc represents the individual call func.
CallOption used by Call or Stream.
CallWrapper is a low level wrapper for the CallFunc.
Option used by the Client.
note that returning either false or a non-nil error will result in the call not being retried.
StreamWrapper wraps a Stream and returns the equivalent.
Wrapper wraps a client and returns a client.