Documentation
¶
Overview ¶
Package http implements the functions, types, and interfaces for the module.
Package http implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- func NewClient(ctx context.Context, cfg *configv1.Service, ss ...Option) (*transhttp.Client, error)
- func NewServer(cfg *configv1.Service, ss ...Option) (*transhttp.Server, error)
- type EndpointFunc
- type Option
- func WithClientOptions(options ...transhttp.ClientOption) Option
- func WithDiscovery(serviceName string, discovery registry.Discovery) Option
- func WithEndpointFunc(endpointFunc EndpointFunc) Option
- func WithHostIp(hostIp string) Option
- func WithMiddlewares(middlewares ...middleware.Middleware) Option
- func WithNodeFilter(filters ...selector.NodeFilter) Option
- func WithPrefix(prefix string) Option
- func WithServerOptions(options ...transhttp.ServerOption) Option
- type Options
Constants ¶
View Source
const (
Scheme = "http"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EndpointFunc ¶ added in v0.1.56
type Option ¶ added in v0.1.0
type Option = func(o *Options)
func WithClientOptions ¶ added in v0.1.25
func WithClientOptions(options ...transhttp.ClientOption) Option
func WithDiscovery ¶ added in v0.1.14
func WithEndpointFunc ¶ added in v0.1.14
func WithEndpointFunc(endpointFunc EndpointFunc) Option
func WithHostIp ¶ added in v0.1.15
func WithMiddlewares ¶ added in v0.1.14
func WithMiddlewares(middlewares ...middleware.Middleware) Option
func WithNodeFilter ¶ added in v0.1.0
func WithNodeFilter(filters ...selector.NodeFilter) Option
func WithPrefix ¶ added in v0.1.15
func WithServerOptions ¶ added in v0.1.25
func WithServerOptions(options ...transhttp.ServerOption) Option
type Options ¶ added in v0.1.56
type Options struct {
Prefix string
HostIp string
ServiceName string
Discovery registry.Discovery
NodeFilters []selector.NodeFilter
Middlewares []middleware.Middleware
EndpointFunc EndpointFunc
ClientOptions []transhttp.ClientOption
ServerOptions []transhttp.ServerOption
}
Click to show internal directories.
Click to hide internal directories.