Documentation
¶
Index ¶
- func NewRPCRetryInterceptorFactory(opt RetryOptions) psrpc.RPCInterceptorFactory
- func NewStreamRetryInterceptorFactory(opt RetryOptions) psrpc.StreamInterceptorFactory
- func WithClientMetrics(observer MetricsObserver) psrpc.ClientOption
- func WithRPCRetries(opt RetryOptions) psrpc.ClientOption
- func WithServerMetrics(observer MetricsObserver) psrpc.ServerOption
- func WithStreamRetries(opt RetryOptions) psrpc.ClientOption
- type MetricRole
- type MetricsObserver
- type RetryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRPCRetryInterceptorFactory ¶
func NewRPCRetryInterceptorFactory(opt RetryOptions) psrpc.RPCInterceptorFactory
func NewStreamRetryInterceptorFactory ¶
func NewStreamRetryInterceptorFactory(opt RetryOptions) psrpc.StreamInterceptorFactory
func WithClientMetrics ¶ added in v0.2.10
func WithClientMetrics(observer MetricsObserver) psrpc.ClientOption
func WithRPCRetries ¶
func WithRPCRetries(opt RetryOptions) psrpc.ClientOption
func WithServerMetrics ¶ added in v0.2.10
func WithServerMetrics(observer MetricsObserver) psrpc.ServerOption
func WithStreamRetries ¶
func WithStreamRetries(opt RetryOptions) psrpc.ClientOption
Types ¶
type MetricRole ¶ added in v0.2.10
type MetricRole int
const ( ClientRole MetricRole ServerRole )
func (MetricRole) String ¶ added in v0.2.10
func (r MetricRole) String() string
type MetricsObserver ¶ added in v0.2.10
type MetricsObserver interface {
OnUnaryRequest(role MetricRole, info psrpc.RPCInfo, duration time.Duration, err error)
OnMultiRequest(role MetricRole, info psrpc.RPCInfo, duration time.Duration, responseCount int, errorCount int)
OnStreamSend(role MetricRole, info psrpc.RPCInfo, duration time.Duration, err error)
OnStreamRecv(role MetricRole, info psrpc.RPCInfo, err error)
OnStreamOpen(role MetricRole, info psrpc.RPCInfo)
OnStreamClose(role MetricRole, info psrpc.RPCInfo)
}
Click to show internal directories.
Click to hide internal directories.