Documentation ¶
Index ¶
- func GrpcLogRequestPayloadInterceptor(inJson bool, ...) grpc.UnaryClientInterceptor
- func GrpcMetricInterceptor(metric telemetry.MetricsManager) grpc.UnaryClientInterceptor
- func GrpcTimeoutInterceptor(t time.Duration) grpc.UnaryClientInterceptor
- func GrpcTraceInterceptor(tc trace.Tracer) grpc.UnaryClientInterceptor
- type AuthorizationCredential
- type ClientManager
- type GrpcTimeoutCallOption
- type Option
- func WithAuthorizationToken(v string) Option
- func WithLogger(v logger.Manager) Option
- func WithLoggingRequestPayload(v bool, inJson bool) Option
- func WithMetrics(enabled bool, metric telemetry.MetricsManager) Option
- func WithName(v string) Option
- func WithTelemetry(v telemetry.Manager) Option
- func WithTelemetryEnabled(v bool) Option
- func WithTimeout(v time.Duration) Option
- func WithTransportCreds(v credentials.TransportCredentials) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrpcLogRequestPayloadInterceptor ¶
func GrpcLogRequestPayloadInterceptor(inJson bool, logWithProps func(props map[string]interface{}, messages ...interface{})) grpc.UnaryClientInterceptor
func GrpcMetricInterceptor ¶
func GrpcMetricInterceptor(metric telemetry.MetricsManager) grpc.UnaryClientInterceptor
func GrpcTimeoutInterceptor ¶
func GrpcTimeoutInterceptor(t time.Duration) grpc.UnaryClientInterceptor
func GrpcTraceInterceptor ¶
func GrpcTraceInterceptor(tc trace.Tracer) grpc.UnaryClientInterceptor
Types ¶
type AuthorizationCredential ¶
type AuthorizationCredential string
func (AuthorizationCredential) GetRequestMetadata ¶
func (AuthorizationCredential) RequireTransportSecurity ¶
func (c AuthorizationCredential) RequireTransportSecurity() bool
type ClientManager ¶
type ClientManager interface { MustConnect() ClientManager Client() grpc.ClientConnInterface Teardown() // contains filtered or unexported methods }
func NewClient ¶
func NewClient(server string, opts ...Option) ClientManager
type GrpcTimeoutCallOption ¶
type GrpcTimeoutCallOption struct { grpc.EmptyCallOption // contains filtered or unexported fields }
func GrpcWithForcedTimeout ¶
func GrpcWithForcedTimeout(forceTimeout time.Duration) GrpcTimeoutCallOption
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAuthorizationToken ¶
func WithLogger ¶
func WithMetrics ¶
func WithMetrics(enabled bool, metric telemetry.MetricsManager) Option
func WithTelemetry ¶
func WithTelemetryEnabled ¶
func WithTimeout ¶
func WithTransportCreds ¶
func WithTransportCreds(v credentials.TransportCredentials) Option
Click to show internal directories.
Click to hide internal directories.