Documentation
¶
Overview ¶
Package service contains generated code by adptool.
Package transport implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- func AddressGRPC(addr string) transgrpc.ServerOption
- func AddressHTTP(addr string) transhttp.ServerOption
- func CodecForRequestHTTP(r *http.Request, name string) (encoding.Codec, bool)
- func CodecForResponseHTTP(r *http.Response) encoding.Codec
- func ContentTypeHTTP(contentType string) transhttp.CallOption
- func CustomHealthGRPC() transgrpc.ServerOption
- func DefaultErrorDecoderHTTP(p0 context.Context, res *http.Response) error
- func DefaultErrorEncoderHTTP(w http.ResponseWriter, r *http.Request, err error)
- func DefaultRequestDecoderHTTP(r *http.Request, v any) error
- func DefaultRequestEncoderHTTP(p0 context.Context, contentType string, in any) ([]byte, error)
- func DefaultRequestQueryHTTP(r *http.Request, v any) error
- func DefaultRequestVarsHTTP(r *http.Request, v any) error
- func DefaultResponseDecoderHTTP(p0 context.Context, res *http.Response, v any) error
- func DefaultResponseEncoderHTTP(w http.ResponseWriter, r *http.Request, v any) error
- func DialGRPC(ctx context.Context, opts ...transgrpc.ClientOption) (*grpc.ClientConn, error)
- func DialInsecureGRPC(ctx context.Context, opts ...transgrpc.ClientOption) (*grpc.ClientConn, error)
- func DisableReflectionGRPC() transgrpc.ServerOption
- func EndpointGRPC(endpoint *url.URL) transgrpc.ServerOption
- func EndpointHTTP(endpoint *url.URL) transhttp.ServerOption
- func ErrorEncoderHTTP(en transhttp.EncodeErrorFunc) transhttp.ServerOption
- func FilterChainHTTP(filters ...transhttp.FilterFunc) transhttp.FilterFunc
- func FilterHTTP(filters ...transhttp.FilterFunc) transhttp.ServerOption
- func GetStreamGRPC(ctx context.Context) grpc.ServerStream
- func HeaderHTTP(header *http.Header) transhttp.CallOption
- func ListenerGRPC(lis net.Listener) transgrpc.ServerOption
- func ListenerHTTP(lis net.Listener) transhttp.ServerOption
- func LoggerGRPC(p0 log.Logger) transgrpc.ServerOption
- func LoggerHTTP(p0 log.Logger) transhttp.ServerOption
- func MethodNotAllowedHandlerHTTP(handler http.Handler) transhttp.ServerOption
- func MiddlewareGRPC(m ...middleware.Middleware) transgrpc.ServerOption
- func MiddlewareHTTP(m ...middleware.Middleware) transhttp.ServerOption
- func NetworkGRPC(network string) transgrpc.ServerOption
- func NetworkHTTP(network string) transhttp.ServerOption
- func NewClientHTTP(ctx context.Context, opts ...transhttp.ClientOption) (*transhttp.Client, error)
- func NewRedirectHTTP(url string, code int) transhttp.Redirector
- func NewServerGRPC(opts ...transgrpc.ServerOption) *transgrpc.Server
- func NewServerHTTP(opts ...transhttp.ServerOption) *transhttp.Server
- func NotFoundHandlerHTTP(handler http.Handler) transhttp.ServerOption
- func OperationHTTP(operation string) transhttp.CallOption
- func OptionsGRPC(opts ...grpc.ServerOption) transgrpc.ServerOption
- func PathPrefixHTTP(prefix string) transhttp.ServerOption
- func PathTemplateHTTP(pattern string) transhttp.CallOption
- func RequestDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
- func RequestFromServerContextHTTP(ctx context.Context) (*http.Request, bool)
- func RequestQueryDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
- func RequestVarsDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
- func ResponseEncoderHTTP(en transhttp.EncodeResponseFunc) transhttp.ServerOption
- func ResponseWriterFromServerContextHTTP(ctx context.Context) (http.ResponseWriter, bool)
- func SetCookieHTTP(ctx context.Context, cookie *http.Cookie)
- func SetOperationHTTP(ctx context.Context, op string)
- func StreamInterceptorGRPC(in ...grpc.StreamServerInterceptor) transgrpc.ServerOption
- func StreamMiddlewareGRPC(m ...middleware.Middleware) transgrpc.ServerOption
- func StrictSlashHTTP(strictSlash bool) transhttp.ServerOption
- func TLSConfigGRPC(c *tls.Config) transgrpc.ServerOption
- func TLSConfigHTTP(c *tls.Config) transhttp.ServerOption
- func TimeoutGRPC(timeout time.Duration) transgrpc.ServerOption
- func TimeoutHTTP(timeout time.Duration) transhttp.ServerOption
- func UnaryInterceptorGRPC(in ...grpc.UnaryServerInterceptor) transgrpc.ServerOption
- func WithBlockHTTP() transhttp.ClientOption
- func WithDiscoveryGRPC(d registry.Discovery) transgrpc.ClientOption
- func WithDiscoveryHTTP(d registry.Discovery) transhttp.ClientOption
- func WithEndpointGRPC(endpoint string) transgrpc.ClientOption
- func WithEndpointHTTP(endpoint string) transhttp.ClientOption
- func WithErrorDecoderHTTP(errorDecoder transhttp.DecodeErrorFunc) transhttp.ClientOption
- func WithHealthCheckGRPC(healthCheck bool) transgrpc.ClientOption
- func WithLoggerGRPC(p0 log.Logger) transgrpc.ClientOption
- func WithMiddlewareGRPC(m ...middleware.Middleware) transgrpc.ClientOption
- func WithMiddlewareHTTP(m ...middleware.Middleware) transhttp.ClientOption
- func WithNodeFilterGRPC(filters ...selector.NodeFilter) transgrpc.ClientOption
- func WithNodeFilterHTTP(filters ...selector.NodeFilter) transhttp.ClientOption
- func WithOptionsGRPC(opts ...grpc.DialOption) transgrpc.ClientOption
- func WithPrintDiscoveryDebugLogGRPC(p bool) transgrpc.ClientOption
- func WithRequestEncoderHTTP(encoder transhttp.EncodeRequestFunc) transhttp.ClientOption
- func WithResponseDecoderHTTP(decoder transhttp.DecodeResponseFunc) transhttp.ClientOption
- func WithStreamInterceptorGRPC(in ...grpc.StreamClientInterceptor) transgrpc.ClientOption
- func WithSubsetGRPC(size int) transgrpc.ClientOption
- func WithSubsetHTTP(size int) transhttp.ClientOption
- func WithTLSConfigGRPC(c *tls.Config) transgrpc.ClientOption
- func WithTLSConfigHTTP(c *tls.Config) transhttp.ClientOption
- func WithTimeoutGRPC(timeout time.Duration) transgrpc.ClientOption
- func WithTimeoutHTTP(d time.Duration) transhttp.ClientOption
- func WithTransportHTTP(trans http.RoundTripper) transhttp.ClientOption
- func WithUnaryInterceptorGRPC(in ...grpc.UnaryClientInterceptor) transgrpc.ClientOption
- func WithUserAgentHTTP(ua string) transhttp.ClientOption
- type CallOptionHTTP
- type ClientHTTP
- type ClientOptionGRPC
- type ClientOptionHTTP
- type ContentTypeCallOptionHTTP
- type ContextHTTP
- type DecodeErrorFuncHTTP
- type DecodeRequestFuncHTTP
- type DecodeResponseFuncHTTP
- type EmptyCallOptionHTTP
- type EncodeErrorFuncHTTP
- type EncodeRequestFuncHTTP
- type EncodeResponseFuncHTTP
- type FilterFuncHTTP
- type FlusherHTTP
- type GRPCClient
- type GRPCClientOption
- type GRPCRegisterFunc
- type GRPCRegistrar
- type GRPCServer
- type GRPCServerOption
- type HTTPClient
- type HTTPClientOption
- type HTTPRegisterFunc
- type HTTPRegistrar
- type HTTPServer
- type HTTPServerOption
- type HandlerFuncHTTP
- type HeaderCallOptionHTTP
- type OperationCallOptionHTTP
- type PathTemplateCallOptionHTTP
- type RedirectorHTTP
- type RequestHTTP
- type ResponseControllerHTTP
- type ResponseTransporterHTTP
- type ResponseWriterHTTP
- type RouteInfoHTTP
- type RouterHTTP
- type ServerGRPC
- type ServerHTTP
- type ServerOptionGRPC
- type ServerOptionHTTP
- type TargetHTTP
- type TrailerGRPC
- type TransportGRPC
- type TransportHTTP
- type TransporterHTTP
- type WalkRouteFuncHTTP
Constants ¶
const DefaultTimeout = 5 * time.Second
const SupportPackageIsVersion1 = transhttp.SupportPackageIsVersion1
Variables ¶
This section is empty.
Functions ¶
func AddressGRPC ¶
func AddressGRPC(addr string) transgrpc.ServerOption
func AddressHTTP ¶
func AddressHTTP(addr string) transhttp.ServerOption
func CodecForRequestHTTP ¶
func ContentTypeHTTP ¶
func ContentTypeHTTP(contentType string) transhttp.CallOption
func CustomHealthGRPC ¶
func CustomHealthGRPC() transgrpc.ServerOption
func DefaultErrorDecoderHTTP ¶
func DefaultErrorEncoderHTTP ¶
func DefaultErrorEncoderHTTP(w http.ResponseWriter, r *http.Request, err error)
func DialGRPC ¶
func DialGRPC(ctx context.Context, opts ...transgrpc.ClientOption) (*grpc.ClientConn, error)
func DialInsecureGRPC ¶
func DialInsecureGRPC(ctx context.Context, opts ...transgrpc.ClientOption) (*grpc.ClientConn, error)
func DisableReflectionGRPC ¶
func DisableReflectionGRPC() transgrpc.ServerOption
func EndpointGRPC ¶
func EndpointGRPC(endpoint *url.URL) transgrpc.ServerOption
func EndpointHTTP ¶
func EndpointHTTP(endpoint *url.URL) transhttp.ServerOption
func ErrorEncoderHTTP ¶
func ErrorEncoderHTTP(en transhttp.EncodeErrorFunc) transhttp.ServerOption
func FilterChainHTTP ¶
func FilterChainHTTP(filters ...transhttp.FilterFunc) transhttp.FilterFunc
func FilterHTTP ¶
func FilterHTTP(filters ...transhttp.FilterFunc) transhttp.ServerOption
func GetStreamGRPC ¶
func GetStreamGRPC(ctx context.Context) grpc.ServerStream
func HeaderHTTP ¶
func HeaderHTTP(header *http.Header) transhttp.CallOption
func ListenerGRPC ¶
func ListenerGRPC(lis net.Listener) transgrpc.ServerOption
func ListenerHTTP ¶
func ListenerHTTP(lis net.Listener) transhttp.ServerOption
func LoggerGRPC ¶
func LoggerGRPC(p0 log.Logger) transgrpc.ServerOption
func LoggerHTTP ¶
func LoggerHTTP(p0 log.Logger) transhttp.ServerOption
func MethodNotAllowedHandlerHTTP ¶
func MethodNotAllowedHandlerHTTP(handler http.Handler) transhttp.ServerOption
func MiddlewareGRPC ¶
func MiddlewareGRPC(m ...middleware.Middleware) transgrpc.ServerOption
func MiddlewareHTTP ¶
func MiddlewareHTTP(m ...middleware.Middleware) transhttp.ServerOption
func NetworkGRPC ¶
func NetworkGRPC(network string) transgrpc.ServerOption
func NetworkHTTP ¶
func NetworkHTTP(network string) transhttp.ServerOption
func NewClientHTTP ¶
func NewRedirectHTTP ¶
func NewRedirectHTTP(url string, code int) transhttp.Redirector
func NewServerGRPC ¶
func NewServerGRPC(opts ...transgrpc.ServerOption) *transgrpc.Server
func NewServerHTTP ¶
func NewServerHTTP(opts ...transhttp.ServerOption) *transhttp.Server
func NotFoundHandlerHTTP ¶
func NotFoundHandlerHTTP(handler http.Handler) transhttp.ServerOption
func OperationHTTP ¶
func OperationHTTP(operation string) transhttp.CallOption
func OptionsGRPC ¶
func OptionsGRPC(opts ...grpc.ServerOption) transgrpc.ServerOption
func PathPrefixHTTP ¶
func PathPrefixHTTP(prefix string) transhttp.ServerOption
func PathTemplateHTTP ¶
func PathTemplateHTTP(pattern string) transhttp.CallOption
func RequestDecoderHTTP ¶
func RequestDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
func RequestQueryDecoderHTTP ¶
func RequestQueryDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
func RequestVarsDecoderHTTP ¶
func RequestVarsDecoderHTTP(dec transhttp.DecodeRequestFunc) transhttp.ServerOption
func ResponseEncoderHTTP ¶
func ResponseEncoderHTTP(en transhttp.EncodeResponseFunc) transhttp.ServerOption
func ResponseWriterFromServerContextHTTP ¶
func ResponseWriterFromServerContextHTTP(ctx context.Context) (http.ResponseWriter, bool)
func SetOperationHTTP ¶
func StreamInterceptorGRPC ¶
func StreamInterceptorGRPC(in ...grpc.StreamServerInterceptor) transgrpc.ServerOption
func StreamMiddlewareGRPC ¶
func StreamMiddlewareGRPC(m ...middleware.Middleware) transgrpc.ServerOption
func StrictSlashHTTP ¶
func StrictSlashHTTP(strictSlash bool) transhttp.ServerOption
func TLSConfigGRPC ¶
func TLSConfigGRPC(c *tls.Config) transgrpc.ServerOption
func TLSConfigHTTP ¶
func TLSConfigHTTP(c *tls.Config) transhttp.ServerOption
func TimeoutGRPC ¶
func TimeoutGRPC(timeout time.Duration) transgrpc.ServerOption
func TimeoutHTTP ¶
func TimeoutHTTP(timeout time.Duration) transhttp.ServerOption
func UnaryInterceptorGRPC ¶
func UnaryInterceptorGRPC(in ...grpc.UnaryServerInterceptor) transgrpc.ServerOption
func WithBlockHTTP ¶
func WithBlockHTTP() transhttp.ClientOption
func WithDiscoveryGRPC ¶
func WithDiscoveryGRPC(d registry.Discovery) transgrpc.ClientOption
func WithDiscoveryHTTP ¶
func WithDiscoveryHTTP(d registry.Discovery) transhttp.ClientOption
func WithEndpointGRPC ¶
func WithEndpointGRPC(endpoint string) transgrpc.ClientOption
func WithEndpointHTTP ¶
func WithEndpointHTTP(endpoint string) transhttp.ClientOption
func WithErrorDecoderHTTP ¶
func WithErrorDecoderHTTP(errorDecoder transhttp.DecodeErrorFunc) transhttp.ClientOption
func WithHealthCheckGRPC ¶
func WithHealthCheckGRPC(healthCheck bool) transgrpc.ClientOption
func WithLoggerGRPC ¶
func WithLoggerGRPC(p0 log.Logger) transgrpc.ClientOption
func WithMiddlewareGRPC ¶
func WithMiddlewareGRPC(m ...middleware.Middleware) transgrpc.ClientOption
func WithMiddlewareHTTP ¶
func WithMiddlewareHTTP(m ...middleware.Middleware) transhttp.ClientOption
func WithNodeFilterGRPC ¶
func WithNodeFilterGRPC(filters ...selector.NodeFilter) transgrpc.ClientOption
func WithNodeFilterHTTP ¶
func WithNodeFilterHTTP(filters ...selector.NodeFilter) transhttp.ClientOption
func WithOptionsGRPC ¶
func WithOptionsGRPC(opts ...grpc.DialOption) transgrpc.ClientOption
func WithPrintDiscoveryDebugLogGRPC ¶
func WithPrintDiscoveryDebugLogGRPC(p bool) transgrpc.ClientOption
func WithRequestEncoderHTTP ¶
func WithRequestEncoderHTTP(encoder transhttp.EncodeRequestFunc) transhttp.ClientOption
func WithResponseDecoderHTTP ¶
func WithResponseDecoderHTTP(decoder transhttp.DecodeResponseFunc) transhttp.ClientOption
func WithStreamInterceptorGRPC ¶
func WithStreamInterceptorGRPC(in ...grpc.StreamClientInterceptor) transgrpc.ClientOption
func WithSubsetGRPC ¶
func WithSubsetGRPC(size int) transgrpc.ClientOption
func WithSubsetHTTP ¶
func WithSubsetHTTP(size int) transhttp.ClientOption
func WithTLSConfigGRPC ¶
func WithTLSConfigGRPC(c *tls.Config) transgrpc.ClientOption
func WithTLSConfigHTTP ¶
func WithTLSConfigHTTP(c *tls.Config) transhttp.ClientOption
func WithTimeoutGRPC ¶
func WithTimeoutGRPC(timeout time.Duration) transgrpc.ClientOption
func WithTimeoutHTTP ¶
func WithTimeoutHTTP(d time.Duration) transhttp.ClientOption
func WithTransportHTTP ¶
func WithTransportHTTP(trans http.RoundTripper) transhttp.ClientOption
func WithUnaryInterceptorGRPC ¶
func WithUnaryInterceptorGRPC(in ...grpc.UnaryClientInterceptor) transgrpc.ClientOption
func WithUserAgentHTTP ¶
func WithUserAgentHTTP(ua string) transhttp.ClientOption
Types ¶
type CallOptionHTTP ¶
type CallOptionHTTP = transhttp.CallOption
type ClientHTTP ¶
type ClientOptionGRPC ¶
type ClientOptionGRPC = transgrpc.ClientOption
type ClientOptionHTTP ¶
type ClientOptionHTTP = transhttp.ClientOption
type ContentTypeCallOptionHTTP ¶
type ContentTypeCallOptionHTTP = transhttp.ContentTypeCallOption
type ContextHTTP ¶
type DecodeErrorFuncHTTP ¶
type DecodeErrorFuncHTTP = transhttp.DecodeErrorFunc
type DecodeRequestFuncHTTP ¶
type DecodeRequestFuncHTTP = transhttp.DecodeRequestFunc
type DecodeResponseFuncHTTP ¶
type DecodeResponseFuncHTTP = transhttp.DecodeResponseFunc
type EmptyCallOptionHTTP ¶
type EmptyCallOptionHTTP = transhttp.EmptyCallOption
type EncodeErrorFuncHTTP ¶
type EncodeErrorFuncHTTP = transhttp.EncodeErrorFunc
type EncodeRequestFuncHTTP ¶
type EncodeRequestFuncHTTP = transhttp.EncodeRequestFunc
type EncodeResponseFuncHTTP ¶
type EncodeResponseFuncHTTP = transhttp.EncodeResponseFunc
type FilterFuncHTTP ¶
type FilterFuncHTTP = transhttp.FilterFunc
type FlusherHTTP ¶
type GRPCClientOption ¶
type GRPCClientOption = transgrpc.ClientOption
GRPCClientOption define the gRPC client options
type GRPCRegisterFunc ¶
type GRPCRegisterFunc func(ctx context.Context, srv *GRPCServer) error
GRPCRegisterFunc is a function that implements GRPCRegistrar.
func (GRPCRegisterFunc) Register ¶
func (f GRPCRegisterFunc) Register(ctx context.Context, srv any) error
Register implements the ServerRegistrar interface for GRPCRegisterFunc.
func (GRPCRegisterFunc) RegisterGRPC ¶
func (f GRPCRegisterFunc) RegisterGRPC(ctx context.Context, srv *GRPCServer) error
RegisterGRPC implements the GRPCRegistrar interface for GRPCRegisterFunc.
type GRPCRegistrar ¶
type GRPCRegistrar interface {
RegisterGRPC(ctx context.Context, srv *GRPCServer) error
}
GRPCRegistrar is a capability interface for services that can register gRPC endpoints.
type GRPCServerOption ¶
type GRPCServerOption = transgrpc.ServerOption
GRPCServerOption define the gRPC server options
type HTTPClientOption ¶
type HTTPClientOption = transhttp.ClientOption
HTTPClientOption define the HTTP client options
type HTTPRegisterFunc ¶
type HTTPRegisterFunc func(ctx context.Context, srv *HTTPServer) error
HTTPRegisterFunc is a function that implements HTTPRegistrar.
func (HTTPRegisterFunc) Register ¶
func (f HTTPRegisterFunc) Register(ctx context.Context, srv any) error
Register implements the ServerRegistrar interface for HTTPRegisterFunc.
func (HTTPRegisterFunc) RegisterHTTP ¶
func (f HTTPRegisterFunc) RegisterHTTP(ctx context.Context, srv *HTTPServer) error
RegisterHTTP implements the HTTPRegistrar interface for HTTPRegisterFunc.
type HTTPRegistrar ¶
type HTTPRegistrar interface {
RegisterHTTP(ctx context.Context, srv *HTTPServer) error
}
HTTPRegistrar is a capability interface for services that can register HTTP endpoints.
type HTTPServerOption ¶
type HTTPServerOption = transhttp.ServerOption
HTTPServerOption define the HTTP server options
type HandlerFuncHTTP ¶
type HandlerFuncHTTP = transhttp.HandlerFunc
type HeaderCallOptionHTTP ¶
type HeaderCallOptionHTTP = transhttp.HeaderCallOption
type OperationCallOptionHTTP ¶
type OperationCallOptionHTTP = transhttp.OperationCallOption
type PathTemplateCallOptionHTTP ¶
type PathTemplateCallOptionHTTP = transhttp.PathTemplateCallOption
type RedirectorHTTP ¶
type RedirectorHTTP = transhttp.Redirector
type RequestHTTP ¶
type ResponseControllerHTTP ¶
type ResponseControllerHTTP = transhttp.ResponseController
type ResponseTransporterHTTP ¶
type ResponseTransporterHTTP = transhttp.ResponseTransporter
type ResponseWriterHTTP ¶
type ResponseWriterHTTP = transhttp.ResponseWriter
type RouteInfoHTTP ¶
type RouterHTTP ¶
type ServerGRPC ¶
type ServerHTTP ¶
type ServerOptionGRPC ¶
type ServerOptionGRPC = transgrpc.ServerOption
type ServerOptionHTTP ¶
type ServerOptionHTTP = transhttp.ServerOption
type TargetHTTP ¶
type TrailerGRPC ¶
type TransportGRPC ¶
type TransportHTTP ¶
type TransporterHTTP ¶
type TransporterHTTP = transhttp.Transporter
type WalkRouteFuncHTTP ¶
type WalkRouteFuncHTTP = transhttp.WalkRouteFunc