Documentation ¶
Index ¶
- func NewEndpoint(scheme, host string) *url.URL
- func ParseEndpoint(endpoints []string, scheme string) (string, error)
- func WithClientContext(ctx context.Context, tr Server) context.Context
- func WithServerContext(ctx context.Context, tr Server) context.Context
- type Endpointer
- type Header
- type Kind
- type RouterList
- type Server
- type Transporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEndpoint ¶
ParseEndpoint parses an Endpoint URL.
func WithClientContext ¶
WithClientContext returns a new Context that carries value.
Types ¶
type Endpointer ¶
type Endpointer interface { ServiceName() string Endpoint() *url.URL RouterPathList() RouterList }
Endpointer is registry endpoint.
type RouterList ¶ added in v0.5.14
type Server ¶
type Server interface { Name() string Type() string Start(context.Context) error Stop(context.Context) error Config(cfg config.Config) }
Server is transport server.
func FromClientContext ¶
FromClientContext returns the Transport value stored in ctx, if any.
type Transporter ¶
type Transporter interface { // Kind transporter // grpc // http Kind() Kind // Endpoint return server or client endpoint // Server Transport: grpc://127.0.0.1:9000 // Client Transport: discovery:///provider-demo Endpoint() string }
Transporter is transport context value interface.
Click to show internal directories.
Click to hide internal directories.