Documentation ¶
Index ¶
- func AppOptions(opts ...Option) []kratos.Option
- func BreakerMiddleware(opts ...ClientOption) middleware.Middleware
- func ClientGrpcOptions(copts ...ClientOption) []tgrpc.ClientOption
- func ClientHTTPOptions(copts ...ClientOption) []http.ClientOption
- func ClientMiddleware() middleware.Middleware
- func ClientOperation(ctx context.Context) (method string, operation string)
- func ID(optFuncs ...Option) kratos.Option
- func LocalEndpoint(ctx context.Context) (local struct{ ... })
- func Metadata(optFuncs ...Option) (opt kratos.Option)
- func Registrar(optFuncs ...Option) kratos.Option
- func ServerMiddleware(opts ...ServerOption) middleware.Middleware
- func ServerOperation(ctx context.Context) (method string, operation string)
- type ClientOption
- func WithBalancer(b balancer.Balancer) ClientOption
- func WithBreakerConfig(cfg *breaker.Config) ClientOption
- func WithBreakerErrorHook(h func(ctx context.Context, operation string, err error) (success bool)) ClientOption
- func WithEnableDiscovery(enableDiscovery bool) ClientOption
- func WithMiddlewares(m ...middleware.Middleware) ClientOption
- type Option
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppOptions ¶
func AppOptions(opts ...Option) []kratos.Option
func BreakerMiddleware ¶
func BreakerMiddleware(opts ...ClientOption) middleware.Middleware
func ClientGrpcOptions ¶
func ClientGrpcOptions(copts ...ClientOption) []tgrpc.ClientOption
func ClientHTTPOptions ¶
func ClientHTTPOptions(copts ...ClientOption) []http.ClientOption
func ClientMiddleware ¶
func ClientMiddleware() middleware.Middleware
ClientMiddleware is client middleware
func LocalEndpoint ¶
func ServerMiddleware ¶
func ServerMiddleware(opts ...ServerOption) middleware.Middleware
ServerMiddleware is a grpc server middleware.
Types ¶
type ClientOption ¶
type ClientOption func(*clientOpionts)
func WithBalancer ¶
func WithBalancer(b balancer.Balancer) ClientOption
func WithBreakerConfig ¶
func WithBreakerConfig(cfg *breaker.Config) ClientOption
func WithBreakerErrorHook ¶
func WithEnableDiscovery ¶
func WithEnableDiscovery(enableDiscovery bool) ClientOption
func WithMiddlewares ¶
func WithMiddlewares(m ...middleware.Middleware) ClientOption
type Option ¶
type Option func(*appOptions)
Option is HTTP server option.
func EnableReigstry ¶
func GRPCServer ¶
func ProtoServiceName ¶
ProtoServiceName specific the proto service name(<package_name.service_name>) generated by swagger api
type ServerOption ¶
type ServerOption func(*serverOpionts)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.