Documentation ¶
Index ¶
- Variables
- func IsEnabled(cfg *Config) bool
- func NewClient(target string, opts ...ClientOption) (*grpc.ClientConn, error)
- func NewDialOptions(opts ...ClientOption) []grpc.DialOption
- func UnaryClientInterceptors(opts ...ClientOption) []grpc.UnaryClientInterceptor
- func UserAgent(cfg *Config) string
- type ClientOption
- func WithClientBreaker() ClientOption
- func WithClientDialOption(opts ...grpc.DialOption) ClientOption
- func WithClientLogger(logger *zap.Logger) ClientOption
- func WithClientMetrics(meter metric.Meter) ClientOption
- func WithClientRetry(cfg *retry.Config) ClientOption
- func WithClientStreamInterceptors(stream ...grpc.StreamClientInterceptor) ClientOption
- func WithClientTLS(sec *st.Config) (ClientOption, error)
- func WithClientTracer(tracer trace.Tracer) ClientOption
- func WithClientUnaryInterceptors(unary ...grpc.UnaryClientInterceptor) ClientOption
- func WithClientUserAgent(userAgent string) ClientOption
- type Config
- type Server
- type ServerParams
Constants ¶
This section is empty.
Variables ¶
Module for fx.
Functions ¶
func NewClient ¶
func NewClient(target string, opts ...ClientOption) (*grpc.ClientConn, error)
NewClient for gRPC.
func NewDialOptions ¶ added in v1.105.0
func NewDialOptions(opts ...ClientOption) []grpc.DialOption
NewDialOptions for gRPC.
func UnaryClientInterceptors ¶ added in v1.134.0
func UnaryClientInterceptors(opts ...ClientOption) []grpc.UnaryClientInterceptor
UnaryClientInterceptors for gRPC.
Types ¶
type ClientOption ¶ added in v1.50.0
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption for gRPC.
func WithClientBreaker ¶ added in v1.50.0
func WithClientBreaker() ClientOption
WithClientBreaker for gRPC.
func WithClientDialOption ¶ added in v1.50.0
func WithClientDialOption(opts ...grpc.DialOption) ClientOption
WithClientDialOption for gRPC.
func WithClientLogger ¶ added in v1.52.0
func WithClientLogger(logger *zap.Logger) ClientOption
WithClientLogger for gRPC.
func WithClientMetrics ¶ added in v1.65.0
func WithClientMetrics(meter metric.Meter) ClientOption
WithClientMetrics for gRPC.
func WithClientRetry ¶ added in v1.50.0
func WithClientRetry(cfg *retry.Config) ClientOption
WithClientRetry for gRPC.
func WithClientStreamInterceptors ¶ added in v1.50.0
func WithClientStreamInterceptors(stream ...grpc.StreamClientInterceptor) ClientOption
WithClientUnaryInterceptors for gRPC.
func WithClientTLS ¶ added in v1.180.0
func WithClientTLS(sec *st.Config) (ClientOption, error)
WithClientTLS for gRPC.
func WithClientTracer ¶ added in v1.52.0
func WithClientTracer(tracer trace.Tracer) ClientOption
WithClientTracer for gRPC.
func WithClientUnaryInterceptors ¶ added in v1.50.0
func WithClientUnaryInterceptors(unary ...grpc.UnaryClientInterceptor) ClientOption
WithClientUnaryInterceptors for gRPC.
func WithClientUserAgent ¶ added in v1.121.0
func WithClientUserAgent(userAgent string) ClientOption
WithUserAgent for gRPC.
type Server ¶ added in v1.70.0
type Server struct {
// contains filtered or unexported fields
}
Server for gRPC.
type ServerParams ¶
type ServerParams struct { fx.In Shutdowner fx.Shutdowner Config *Config Logger *zap.Logger Tracer trace.Tracer Meter metric.Meter Limiter *v3.Limiter Key limiter.KeyFunc Unary []grpc.UnaryServerInterceptor `optional:"true"` Stream []grpc.StreamServerInterceptor `optional:"true"` }
ServerParams for gRPC.
Click to show internal directories.
Click to hide internal directories.