Documentation ¶
Overview ¶
Package httpserver implements the HTTPServer.
Index ¶
- Constants
- type HTTPServer
- func (hs *HTTPServer) Category() supervisor.ObjectCategory
- func (hs *HTTPServer) Close()
- func (hs *HTTPServer) DefaultSpec() interface{}
- func (hs *HTTPServer) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object, ...)
- func (hs *HTTPServer) Init(superSpec *supervisor.Spec, muxMapper context.MuxMapper)
- func (hs *HTTPServer) Kind() string
- func (hs *HTTPServer) Status() *supervisor.Status
- type Spec
- type Status
Constants ¶
View Source
const ( // Category is the category of HTTPServer. Category = supervisor.CategoryTrafficGate // Kind is the kind of HTTPServer. Kind = "HTTPServer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer is Object HTTPServer.
func (*HTTPServer) Category ¶
func (hs *HTTPServer) Category() supervisor.ObjectCategory
Category returns the category of HTTPServer.
func (*HTTPServer) DefaultSpec ¶
func (hs *HTTPServer) DefaultSpec() interface{}
DefaultSpec returns the default spec of HTTPServer.
func (*HTTPServer) Inherit ¶
func (hs *HTTPServer) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object, muxMapper context.MuxMapper)
Inherit inherits previous generation of HTTPServer.
func (*HTTPServer) Init ¶
func (hs *HTTPServer) Init(superSpec *supervisor.Spec, muxMapper context.MuxMapper)
Init initializes HTTPServer.
func (*HTTPServer) Status ¶
func (hs *HTTPServer) Status() *supervisor.Status
Status is the wrapper of runtime's Status.
type Spec ¶
type Spec struct { HTTP3 bool `json:"http3,omitempty"` KeepAlive bool `json:"keepAlive" jsonschema:"required"` HTTPS bool `json:"https" jsonschema:"required"` AutoCert bool `json:"autoCert,omitempty"` XForwardedFor bool `json:"xForwardedFor,omitempty"` Address string `json:"address,omitempty"` Port uint16 `json:"port" jsonschema:"required,minimum=1"` ClientMaxBodySize int64 `json:"clientMaxBodySize,omitempty"` KeepAliveTimeout string `json:"keepAliveTimeout,omitempty" jsonschema:"format=duration"` MaxConnections uint32 `json:"maxConnections,omitempty" jsonschema:"minimum=1"` CacheSize uint32 `json:"cacheSize,omitempty"` Tracing *tracing.Spec `json:"tracing,omitempty"` CaCertBase64 string `json:"caCertBase64,omitempty" jsonschema:"format=base64"` // Support multiple certs, preserve the certbase64 and keybase64 // for backward compatibility CertBase64 string `json:"certBase64,omitempty" jsonschema:"format=base64"` KeyBase64 string `json:"keyBase64,omitempty" jsonschema:"format=base64"` // Certs saved as map, key is domain name, value is cert Certs map[string]string `json:"certs,omitempty"` // Keys saved as map, key is domain name, value is secret Keys map[string]string `json:"keys,omitempty"` RouterKind string `json:"routerKind,omitempty" jsonschema:"enum=,enum=Ordered,enum=RadixTree"` IPFilter *ipfilter.Spec `json:"ipFilter,omitempty"` Rules routers.Rules `json:"rules,omitempty"` GlobalFilter string `json:"globalFilter,omitempty"` AccessLogFormat string `json:"accessLogFormat,omitempty"` }
Spec describes the HTTPServer.
Directories ¶
Path | Synopsis |
---|---|
Package routers provides the router interface and the implementation of different routing policies.
|
Package routers provides the router interface and the implementation of different routing policies. |
ordered
Package ordered provides the router implementation of ordered routing policy.
|
Package ordered provides the router implementation of ordered routing policy. |
radixtree
Package radixtree provides the router implementation of radix tree routing policy.
|
Package radixtree provides the router implementation of radix tree routing policy. |
Click to show internal directories.
Click to hide internal directories.