Documentation ¶
Index ¶
- Constants
- type ClientFactory
- type Config
- func (c *Config) Add(protocol string, factory ServerFactory)
- func (c *Config) Delete(protocol string)
- func (c *Config) Get(name string) ServerFactory
- func (c *Config) Load(core Core, protocol string) (server protocol.Server, err error)
- func (c *Config) LoadAll(core Core) (serverMap ServerMap, err error)
- type Core
- type ServerFactory
- type ServerMap
Constants ¶
View Source
const ( // must be the same with the ALPN nextProto values HTTP1 = "http/1.1" HTTP2 = "h2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶ added in v0.2.0
type ClientFactory interface {
NewHostClient() (hc client.HostClient, err error)
}
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Add ¶
func (c *Config) Add(protocol string, factory ServerFactory)
func (*Config) Get ¶
func (c *Config) Get(name string) ServerFactory
type Core ¶
type Core interface { // IsRunning Check whether engine is running or not IsRunning() bool // A RequestContext pool ready for protocol server impl GetCtxPool() *sync.Pool // Business logic entrance // After pre-read works, protocol server may call this method // to introduce the middlewares and handlers ServeHTTP(c context.Context, ctx *app.RequestContext) // GetTracer for tracing requirement GetTracer() tracer.Controller }
Core is the core interface that promises to be provided for the protocol layer extensions
type ServerFactory ¶
Click to show internal directories.
Click to hide internal directories.