Documentation ¶
Index ¶
- Constants
- func GetFullMethodName(ctx context.Context) string
- func WithHTTPHeaderForServer(ctx context.Context, header http.Header) context.Context
- func WithHeader(ctx context.Context, header Header) context.Context
- func WithServiceInfo(ctx context.Context, info ServiceInfo) context.Context
- type Header
- type Register
- type ServiceInfo
- type ServiceOption
- type ServiceOptions
Constants ¶
View Source
const ServiceInfoContextKey = serviceInfoContextKey(0)
ServiceInfoContextKey .
Variables ¶
This section is empty.
Functions ¶
func WithHTTPHeaderForServer ¶
WithHTTPHeaderForServer setup header for http server
func WithHeader ¶
WithHeader setup header for caller
func WithServiceInfo ¶
func WithServiceInfo(ctx context.Context, info ServiceInfo) context.Context
WithServiceInfo .
Types ¶
type ServiceInfo ¶
ServiceInfo .
func ContextServiceInfo ¶
func ContextServiceInfo(ctx context.Context) ServiceInfo
ContextServiceInfo .
func NewServiceInfo ¶
func NewServiceInfo(service string, method string, instance interface{}) ServiceInfo
NewServiceInfo .
type ServiceOption ¶
type ServiceOption func(*ServiceOptions)
ServiceOption .
func WithHTTPOptions ¶
func WithHTTPOptions(o ...transhttp.HandleOption) ServiceOption
WithHTTPOptions .
func WithInterceptors ¶
func WithInterceptors(o ...interceptor.Interceptor) ServiceOption
WithInterceptors .
type ServiceOptions ¶
type ServiceOptions struct { HTTP []transhttp.HandleOption GRPC []transgrpc.HandleOption }
ServiceOptions .
Click to show internal directories.
Click to hide internal directories.