Documentation
¶
Index ¶
- Constants
- func BugExitf(f string, v ...any)
- func BugExitln(v ...any)
- func ConstBytes(s string) (p []byte)
- func DebugLevel() int32
- func DevelMode() bool
- func EnvExitf(f string, v ...any)
- func EnvExitln(v ...any)
- func Errorf(f string, v ...any)
- func Errorln(v ...any)
- func FCGIReverseProxy(httpReq ServerRequest, httpResp ServerResponse, hcache Hcache, ...)
- func Get4K() []byte
- func Get16K() []byte
- func Get64K1() []byte
- func GetNK(n int64) []byte
- func HTTPReverseProxy(servReq ServerRequest, servResp ServerResponse, hcache Hcache, ...)
- func LogDir() string
- func Printf(f string, v ...any)
- func Println(v ...any)
- func PutNK(p []byte)
- func QUIXReverseProxy(servConn *QUIXConn, servStream *QUIXStream, backend *QUIXBackend, ...)
- func RegisterBackend(compSign string, create func(compName string, stage *Stage) Backend)
- func RegisterCronjob(compSign string, create func(compName string, stage *Stage) Cronjob)
- func RegisterHandlet(compSign string, ...)
- func RegisterHcache(compSign string, create func(compName string, stage *Stage) Hcache)
- func RegisterHstate(compSign string, create func(compName string, stage *Stage) Hstate)
- func RegisterLogger(loggerSign string, create func(config *LogConfig) Logger)
- func RegisterQUIXDealet(compSign string, ...)
- func RegisterReviser(compSign string, ...)
- func RegisterServer(compSign string, create func(compName string, stage *Stage) Server)
- func RegisterServiceInit(serviceName string, init func(service *Service) error)
- func RegisterSocklet(compSign string, ...)
- func RegisterTCPXDealet(compSign string, ...)
- func RegisterUDPXDealet(compSign string, ...)
- func RegisterWebappInit(webappName string, init func(webapp *Webapp) error)
- func SCGIReverseProxy(httpReq ServerRequest, httpResp ServerResponse, hcache Hcache, ...)
- func SOCKReverseProxy(servReq ServerRequest, servSock ServerSocket, backend HTTPBackend, ...)
- func SetDebugLevel(level int32)
- func SetDevelMode(devel bool)
- func SetLogDir(dir string)
- func SetTmpDir(dir string)
- func SetTopDir(dir string)
- func SetVarDir(dir string)
- func TCPXReverseProxy(servConn *TCPXConn, backend *TCPXBackend, proxyConfig *TCPXProxyConfig)
- func TmpDir() string
- func TopDir() string
- func UDPXReverseProxy(servConn *UDPXConn, backend *UDPXBackend, proxyConfig *UDPXProxyConfig)
- func UseExitf(f string, v ...any)
- func UseExitln(v ...any)
- func VarDir() string
- func WeakString(p []byte) (s string)
- type Backend
- type BackendRequest
- type BackendResponse
- type BackendSocket
- type BackendStream
- type Backend_
- func (b *Backend_[N]) AddNode(node N)
- func (b *Backend_[N]) ConfigureNodes()
- func (b *Backend_[N]) DecNode()
- func (b *Backend_[N]) Maintain()
- func (b *Backend_[N]) OnConfigure()
- func (b *Backend_[N]) OnCreate(compName string, stage *Stage)
- func (b *Backend_[N]) OnPrepare()
- func (b *Backend_[N]) OnShutdown()
- func (b *Backend_[N]) PrepareNodes()
- func (b *Backend_[N]) Stage() *Stage
- type Bundlet
- type Bundlet_
- type Chain
- type Component
- type Component_
- func (c *Component_) CompName() string
- func (c *Component_) ConfigureBool(propName string, prop *bool, defaultValue bool)
- func (c *Component_) ConfigureBytes(propName string, prop *[]byte, check func(value []byte) error, ...)
- func (c *Component_) ConfigureBytesList(propName string, prop *[][]byte, check func(value [][]byte) error, ...)
- func (c *Component_) ConfigureDuration(propName string, prop *time.Duration, check func(value time.Duration) error, ...)
- func (c *Component_) ConfigureInt(propName string, prop *int, check func(value int) error, defaultValue int)
- func (c *Component_) ConfigureInt8(propName string, prop *int8, check func(value int8) error, defaultValue int8)
- func (c *Component_) ConfigureInt16(propName string, prop *int16, check func(value int16) error, ...)
- func (c *Component_) ConfigureInt32(propName string, prop *int32, check func(value int32) error, ...)
- func (c *Component_) ConfigureInt64(propName string, prop *int64, check func(value int64) error, ...)
- func (c *Component_) ConfigureString(propName string, prop *string, check func(value string) error, ...)
- func (c *Component_) ConfigureStringDict(propName string, prop *map[string]string, ...)
- func (c *Component_) ConfigureStringList(propName string, prop *[]string, check func(value []string) error, ...)
- func (c *Component_) Find(propName string) (propValue Value, ok bool)
- func (c *Component_) LoopRun(interval time.Duration, callback func(now time.Time))
- func (c *Component_) MakeComp(compName string)
- func (c *Component_) Prop(propName string) (propValue Value, ok bool)
- type Cookie
- func (c *Cookie) Set(name string, value string) bool
- func (c *Cookie) SetDomain(domain string) bool
- func (c *Cookie) SetExpires(expires time.Time) bool
- func (c *Cookie) SetHttpOnly()
- func (c *Cookie) SetMaxAge(maxAge int32)
- func (c *Cookie) SetPath(path string) bool
- func (c *Cookie) SetSameSite(mode string)
- func (c *Cookie) SetSameSiteLax()
- func (c *Cookie) SetSameSiteNone()
- func (c *Cookie) SetSameSiteStrict()
- func (c *Cookie) SetSecure()
- type Cronjob
- type Cronjob_
- type FCGIBackend
- type FCGIProxyConfig
- type Gate
- type Gate_
- func (h *Gate_) Address() string
- func (g *Gate_[S]) DecConn()
- func (g *Gate_[S]) ID() int32
- func (g *Gate_[S]) IncConn()
- func (g *Gate_[S]) IsShut() bool
- func (g *Gate_[S]) MarkShut()
- func (g *Gate_[S]) OnNew(server S, id int32)
- func (h *Gate_) ReadTimeout() time.Duration
- func (g *Gate_[S]) Server() S
- func (h *Gate_) Stage() *Stage
- func (h *Gate_) TLSConfig() *tls.Config
- func (h *Gate_) TLSMode() bool
- func (h *Gate_) UDSMode() bool
- func (g *Gate_[S]) WaitConns()
- func (h *Gate_) WriteTimeout() time.Duration
- type HTTP1Backend
- type HTTP2Backend
- type HTTP3Backend
- type HTTPBackend
- type HTTPNode
- type HTTPProxyConfig
- type HTTPServer
- type Handle
- type Handlet
- type Handlet_
- func (h *Handlet_) Dispatch(req ServerRequest, resp ServerResponse, notFound Handle)
- func (h *Handlet_) IsCache() bool
- func (h *Handlet_) IsProxy() bool
- func (h *Handlet_) OnCreate(compName string, stage *Stage, webapp *Webapp)
- func (h *Handlet_) Stage() *Stage
- func (h *Handlet_) UseMapper(handlet Handlet, mapper Mapper)
- func (h *Handlet_) Webapp() *Webapp
- type Hcache
- type Hcache_
- type Hobject
- type Hstate
- type Hstate_
- type LogConfig
- type Logger
- type Mapper
- type Node
- type Node_
- func (h *Node_) Address() string
- func (n *Node_[B]) Backend() B
- func (n *Node_[B]) DecConn()
- func (n *Node_[B]) DecConns(size int)
- func (n *Node_[B]) DialTimeout() time.Duration
- func (n *Node_[B]) IncConn()
- func (n *Node_[B]) OnConfigure()
- func (n *Node_[B]) OnCreate(compName string, stage *Stage, backend B)
- func (n *Node_[B]) OnPrepare()
- func (n *Node_[B]) OnShutdown()
- func (h *Node_) ReadTimeout() time.Duration
- func (h *Node_) Stage() *Stage
- func (h *Node_) TLSConfig() *tls.Config
- func (h *Node_) TLSMode() bool
- func (h *Node_) UDSMode() bool
- func (n *Node_[B]) WaitConns()
- func (h *Node_) WriteTimeout() time.Duration
- type Piece
- type QConn
- type QStream
- type QUIXBackend
- type QUIXConn
- type QUIXDealet
- type QUIXDealet_
- type QUIXProxyConfig
- type QUIXRouter
- func (r *QUIXRouter) DecCase()
- func (r *QUIXRouter) DecDealet()
- func (r *QUIXRouter) MaxConcurrentConnsPerGate() int32
- func (h *QUIXRouter) MaxConcurrentStreamsPerConn() int32
- func (h *QUIXRouter) MaxCumulativeStreamsPerConn() int32
- func (r *QUIXRouter) OnConfigure()
- func (r *QUIXRouter) OnPrepare()
- func (r *QUIXRouter) Serve()
- type QUIXStream
- type RPCServer
- type Range
- type Region
- type Reviser
- type Reviser_
- type Rule
- type SCGIBackend
- type SCGIProxyConfig
- type SOCKProxyConfig
- type Server
- type ServerRequest
- type ServerResponse
- type ServerSocket
- type Server_
- func (s *Server_[G]) AddGate(gate G)
- func (h *Server_) Address() string
- func (s *Server_[G]) Colonport() string
- func (s *Server_[G]) ColonportBytes() []byte
- func (s *Server_[G]) DecGate()
- func (s *Server_[G]) NumGates() int32
- func (s *Server_[G]) OnConfigure()
- func (s *Server_[G]) OnCreate(compName string, stage *Stage)
- func (s *Server_[G]) OnPrepare()
- func (s *Server_[G]) OnShutdown()
- func (h *Server_) ReadTimeout() time.Duration
- func (h *Server_) Stage() *Stage
- func (h *Server_) TLSConfig() *tls.Config
- func (h *Server_) TLSMode() bool
- func (h *Server_) UDSMode() bool
- func (s *Server_[G]) WaitGates()
- func (h *Server_) WriteTimeout() time.Duration
- type Service
- type Session
- type Socklet
- type Socklet_
- type Stage
- func (s *Stage) Backend(compName string) Backend
- func (s *Stage) Clock() *clockFixture
- func (s *Stage) Cronjob(compName string) Cronjob
- func (s *Stage) DecBackend()
- func (s *Stage) DecCronjob()
- func (s *Stage) DecHcache()
- func (s *Stage) DecHstate()
- func (s *Stage) DecRouter()
- func (s *Stage) DecServer()
- func (s *Stage) DecService()
- func (s *Stage) DecWebapp()
- func (s *Stage) Fcache() *fcacheFixture
- func (s *Stage) Fixture(compSign string) fixture
- func (s *Stage) Hcache(compName string) Hcache
- func (s *Stage) Hstate(compName string) Hstate
- func (s *Stage) ID() int32
- func (s *Stage) NumCPU() int32
- func (s *Stage) OnConfigure()
- func (s *Stage) OnPrepare()
- func (s *Stage) OnShutdown()
- func (s *Stage) ProfBlock()
- func (s *Stage) ProfCPU()
- func (s *Stage) ProfGoroutine()
- func (s *Stage) ProfHeap()
- func (s *Stage) ProfThread()
- func (s *Stage) QUIXRouter(compName string) *QUIXRouter
- func (s *Stage) Quit()
- func (s *Stage) Resolv() *resolvFixture
- func (s *Stage) Server(compName string) Server
- func (s *Stage) Service(compName string) *Service
- func (s *Stage) Start(id int32)
- func (s *Stage) TCPXRouter(compName string) *TCPXRouter
- func (s *Stage) UDPXRouter(compName string) *UDPXRouter
- func (s *Stage) Webapp(compName string) *Webapp
- type TCPXBackend
- type TCPXConn
- func (c *TCPXConn) Close()
- func (c *TCPXConn) CloseRead()
- func (c *TCPXConn) CloseWrite()
- func (c *TCPXConn) MakeTempName(dst []byte, unixTime int64) int
- func (c *TCPXConn) Recv() (data []byte, err error)
- func (c *TCPXConn) Send(data []byte) (err error)
- func (c *TCPXConn) Sendv() (err error)
- func (c *TCPXConn) SetReadDeadline() error
- func (c *TCPXConn) SetWriteDeadline() error
- func (c *TCPXConn) TLSMode() bool
- func (c *TCPXConn) UDSMode() bool
- type TCPXDealet
- type TCPXDealet_
- type TCPXProxyConfig
- type TCPXRouter
- type TConn
- func (c *TConn) Close() error
- func (c *TConn) CloseRead()
- func (c *TConn) CloseWrite()
- func (c *TConn) MakeTempName(dst []byte, unixTime int64) int
- func (c *TConn) Recv() (data []byte, err error)
- func (c *TConn) Send(data []byte) (err error)
- func (c *TConn) Sendv() (err error)
- func (c *TConn) SetReadDeadline() error
- func (c *TConn) SetWriteDeadline() error
- func (c *TConn) TLSMode() bool
- func (c *TConn) UDSMode() bool
- type UConn
- type UDPXBackend
- type UDPXConn
- type UDPXDealet
- type UDPXDealet_
- type UDPXProxyConfig
- type UDPXRouter
- type Upfile
- type Value
- func (v *Value) Bool() (b bool, ok bool)
- func (v *Value) Bytes() (p []byte, ok bool)
- func (v *Value) BytesList() (list [][]byte, ok bool)
- func (v *Value) BytesVar(keeper varKeeper) []byte
- func (v *Value) Dict() (dict map[string]Value, ok bool)
- func (v *Value) Duration() (d time.Duration, ok bool)
- func (v *Value) Int() (i int, ok bool)
- func (v *Value) Int8() (i8 int8, ok bool)
- func (v *Value) Int16() (i16 int16, ok bool)
- func (v *Value) Int32() (i32 int32, ok bool)
- func (v *Value) Int64() (i64 int64, ok bool)
- func (v *Value) IsBool() bool
- func (v *Value) IsDict() bool
- func (v *Value) IsDuration() bool
- func (v *Value) IsInteger() bool
- func (v *Value) IsList() bool
- func (v *Value) IsString() bool
- func (v *Value) IsVariable() bool
- func (v *Value) List() (list []Value, ok bool)
- func (v *Value) ListN(n int) (list []Value, ok bool)
- func (v *Value) String() (s string, ok bool)
- func (v *Value) StringDict() (dict map[string]string, ok bool)
- func (v *Value) StringList() (list []string, ok bool)
- func (v *Value) StringListN(n int) (list []string, ok bool)
- func (v *Value) StringVar(keeper varKeeper) string
- func (v *Value) Uint32() (u32 uint32, ok bool)
- type Webapp
- func (a *Webapp) AddSetting(name string, value string)
- func (l *Webapp) CloseLog()
- func (a *Webapp) DecHandlet()
- func (a *Webapp) DecReviser()
- func (a *Webapp) DecRule()
- func (a *Webapp) DecSocklet()
- func (a *Webapp) Handlet(compName string) Handlet
- func (l *Webapp) Logf(f string, v ...any)
- func (a *Webapp) OnConfigure()
- func (a *Webapp) OnPrepare()
- func (a *Webapp) OnShutdown()
- func (a *Webapp) Reviser(compName string) Reviser
- func (a *Webapp) Rule(compName string) *Rule
- func (a *Webapp) Setting(name string) (value string, ok bool)
- func (a *Webapp) Socklet(compName string) Socklet
Constants ¶
const ( CodeBug = 20 CodeUse = 21 CodeEnv = 22 )
const ( K = 1 << 10 M = 1 << 20 G = 1 << 30 T = 1 << 40 )
const ( // version codes Version1_0 = 0 // must be 0, default value Version1_1 = 1 Version2 = 2 Version3 = 3 // scheme codes SchemeHTTP = 0 // must be 0, default value SchemeHTTPS = 1 // best known http method codes MethodGET = 0x00000001 MethodHEAD = 0x00000002 MethodPOST = 0x00000004 MethodPUT = 0x00000008 MethodDELETE = 0x00000010 MethodCONNECT = 0x00000020 MethodOPTIONS = 0x00000040 MethodTRACE = 0x00000080 // status codes // 1XX StatusContinue = 100 StatusSwitchingProtocols = 101 StatusProcessing = 102 StatusEarlyHints = 103 // 2XX StatusOK = 200 StatusCreated = 201 StatusAccepted = 202 StatusNonAuthoritativeInfomation = 203 StatusNoContent = 204 StatusResetContent = 205 StatusPartialContent = 206 StatusMultiStatus = 207 StatusAlreadyReported = 208 StatusIMUsed = 226 // 3XX StatusMultipleChoices = 300 StatusMovedPermanently = 301 StatusFound = 302 StatusSeeOther = 303 StatusNotModified = 304 StatusUseProxy = 305 StatusTemporaryRedirect = 307 StatusPermanentRedirect = 308 // 4XX StatusBadRequest = 400 StatusPaymentRequired = 402 StatusForbidden = 403 StatusNotFound = 404 StatusMethodNotAllowed = 405 StatusNotAcceptable = 406 StatusProxyAuthenticationRequired = 407 StatusRequestTimeout = 408 StatusConflict = 409 StatusGone = 410 StatusLengthRequired = 411 StatusPreconditionFailed = 412 StatusContentTooLarge = 413 StatusURITooLong = 414 StatusUnsupportedMediaType = 415 StatusRangeNotSatisfiable = 416 StatusExpectationFailed = 417 StatusMisdirectedRequest = 421 StatusUnprocessableEntity = 422 StatusLocked = 423 StatusFailedDependency = 424 StatusTooEarly = 425 StatusUpgradeRequired = 426 StatusPreconditionRequired = 428 StatusTooManyRequests = 429 StatusRequestHeaderFieldsTooLarge = 431 // 5XX StatusInternalServerError = 500 StatusNotImplemented = 501 StatusBadGateway = 502 StatusGatewayTimeout = 504 StatusHTTPVersionNotSupported = 505 StatusVariantAlsoNegotiates = 506 StatusInsufficientStorage = 507 StatusLoopDetected = 508 StatusNotExtended = 510 StatusNetworkAuthenticationRequired = 511 )
const Version = "0.2.4"
Variables ¶
This section is empty.
Functions ¶
func ConstBytes ¶ added in v0.2.0
func DebugLevel ¶ added in v0.2.0
func DebugLevel() int32
func FCGIReverseProxy ¶ added in v0.2.4
func FCGIReverseProxy(httpReq ServerRequest, httpResp ServerResponse, hcache Hcache, backend *FCGIBackend, proxyConfig *FCGIProxyConfig)
FCGIReverseProxy
func HTTPReverseProxy ¶ added in v0.2.4
func HTTPReverseProxy(servReq ServerRequest, servResp ServerResponse, hcache Hcache, backend HTTPBackend, proxyConfig *HTTPProxyConfig)
HTTPReverseProxy
func QUIXReverseProxy ¶ added in v0.2.0
func QUIXReverseProxy(servConn *QUIXConn, servStream *QUIXStream, backend *QUIXBackend, proxyConfig *QUIXProxyConfig)
QUIXReverseProxy
func RegisterBackend ¶
func RegisterCronjob ¶
func RegisterHandlet ¶
func RegisterHcache ¶ added in v0.2.1
func RegisterHstate ¶ added in v0.2.1
func RegisterLogger ¶ added in v0.2.4
func RegisterQUIXDealet ¶ added in v0.2.0
func RegisterQUIXDealet(compSign string, create func(compName string, stage *Stage, router *QUIXRouter) QUIXDealet)
func RegisterReviser ¶
func RegisterServer ¶
func RegisterServiceInit ¶ added in v0.2.0
func RegisterSocklet ¶
func RegisterTCPXDealet ¶ added in v0.2.0
func RegisterTCPXDealet(compSign string, create func(compName string, stage *Stage, router *TCPXRouter) TCPXDealet)
func RegisterUDPXDealet ¶ added in v0.2.0
func RegisterUDPXDealet(compSign string, create func(compName string, stage *Stage, router *UDPXRouter) UDPXDealet)
func RegisterWebappInit ¶ added in v0.2.0
func SCGIReverseProxy ¶ added in v0.2.4
func SCGIReverseProxy(httpReq ServerRequest, httpResp ServerResponse, hcache Hcache, backend *SCGIBackend, proxyConfig *SCGIProxyConfig)
SCGIReverseProxy
func SOCKReverseProxy ¶ added in v0.2.4
func SOCKReverseProxy(servReq ServerRequest, servSock ServerSocket, backend HTTPBackend, proxyConfig *SOCKProxyConfig)
SOCKReverseProxy
func SetDebugLevel ¶ added in v0.2.0
func SetDebugLevel(level int32)
func SetDevelMode ¶ added in v0.2.4
func SetDevelMode(devel bool)
func TCPXReverseProxy ¶ added in v0.2.0
func TCPXReverseProxy(servConn *TCPXConn, backend *TCPXBackend, proxyConfig *TCPXProxyConfig)
TCPXReverseProxy
func UDPXReverseProxy ¶ added in v0.2.0
func UDPXReverseProxy(servConn *UDPXConn, backend *UDPXBackend, proxyConfig *UDPXProxyConfig)
UDPXReverseProxy
func WeakString ¶ added in v0.2.0
Types ¶
type Backend ¶
type Backend interface {
// Imports
Component
// Methods
Maintain() // runner
CreateNode(compName string) Node
}
Backend component. A Backend is a group of nodes.
type BackendRequest ¶ added in v0.2.2
type BackendRequest interface {
// contains filtered or unexported methods
}
BackendRequest is the backend-side http request.
type BackendResponse ¶ added in v0.2.2
type BackendResponse interface {
KeepAlive() bool
HeadResult() int16
BodyResult() int16
Status() int16
HasContent() bool
ContentSize() int64
HasTrailers() bool
IsVague() bool
// contains filtered or unexported methods
}
BackendResponse is the backend-side http response.
type BackendSocket ¶ added in v0.2.2
type BackendSocket interface {
Read(dst []byte) (int, error)
Write(src []byte) (int, error)
Close() error
}
BackendSocket is the backend-side webSocket.
type BackendStream ¶ added in v0.2.2
type BackendStream interface {
Response() BackendResponse
Request() BackendRequest
Socket() BackendSocket
// contains filtered or unexported methods
}
BackendStream is the backend-side http stream.
type Backend_ ¶ added in v0.2.0
type Backend_[N Node] struct { // Parent Component_ // contains filtered or unexported fields }
Backend_ is a parent.
func (*Backend_[N]) ConfigureNodes ¶ added in v0.2.0
func (b *Backend_[N]) ConfigureNodes()
func (*Backend_[N]) OnConfigure ¶ added in v0.2.0
func (b *Backend_[N]) OnConfigure()
func (*Backend_[N]) OnShutdown ¶ added in v0.2.0
func (b *Backend_[N]) OnShutdown()
func (*Backend_[N]) PrepareNodes ¶ added in v0.2.0
func (b *Backend_[N]) PrepareNodes()
type Bundlet ¶ added in v0.1.6
type Bundlet interface {
}
Bundlet is a collection of related procedures in a service. A service has many bundlets. Bundlets are not components.
type Chain ¶ added in v0.2.0
type Chain struct {
// contains filtered or unexported fields
}
Chain is a linked-list of pieces.
type Component ¶ added in v0.2.0
type Component interface {
MakeComp(compName string)
CompName() string
OnConfigure()
Find(propName string) (propValue Value, ok bool)
Prop(propName string) (propValue Value, ok bool)
ConfigureBool(propName string, prop *bool, defaultValue bool)
ConfigureInt64(propName string, prop *int64, check func(value int64) error, defaultValue int64)
ConfigureInt32(propName string, prop *int32, check func(value int32) error, defaultValue int32)
ConfigureInt16(propName string, prop *int16, check func(value int16) error, defaultValue int16)
ConfigureInt8(propName string, prop *int8, check func(value int8) error, defaultValue int8)
ConfigureInt(propName string, prop *int, check func(value int) error, defaultValue int)
ConfigureString(propName string, prop *string, check func(value string) error, defaultValue string)
ConfigureBytes(propName string, prop *[]byte, check func(value []byte) error, defaultValue []byte)
ConfigureDuration(propName string, prop *time.Duration, check func(value time.Duration) error, defaultValue time.Duration)
ConfigureStringList(propName string, prop *[]string, check func(value []string) error, defaultValue []string)
ConfigureBytesList(propName string, prop *[][]byte, check func(value [][]byte) error, defaultValue [][]byte)
ConfigureStringDict(propName string, prop *map[string]string, check func(value map[string]string) error, defaultValue map[string]string)
OnPrepare()
OnShutdown()
// contains filtered or unexported methods
}
Component is the interface for all components.
type Component_ ¶
type Component_ struct {
ShutChan chan struct{} // used to notify the component to shutdown
// contains filtered or unexported fields
}
Component_ is a parent.
func (*Component_) CompName ¶ added in v0.2.1
func (c *Component_) CompName() string
func (*Component_) ConfigureBool ¶ added in v0.2.0
func (c *Component_) ConfigureBool(propName string, prop *bool, defaultValue bool)
func (*Component_) ConfigureBytes ¶ added in v0.2.0
func (*Component_) ConfigureBytesList ¶ added in v0.2.0
func (*Component_) ConfigureDuration ¶ added in v0.2.0
func (*Component_) ConfigureInt ¶ added in v0.2.0
func (*Component_) ConfigureInt8 ¶ added in v0.2.0
func (*Component_) ConfigureInt16 ¶ added in v0.2.0
func (*Component_) ConfigureInt32 ¶ added in v0.2.0
func (*Component_) ConfigureInt64 ¶ added in v0.2.0
func (*Component_) ConfigureString ¶ added in v0.2.0
func (*Component_) ConfigureStringDict ¶ added in v0.2.0
func (*Component_) ConfigureStringList ¶ added in v0.2.0
func (*Component_) Find ¶ added in v0.2.0
func (c *Component_) Find(propName string) (propValue Value, ok bool)
func (*Component_) LoopRun ¶ added in v0.2.0
func (c *Component_) LoopRun(interval time.Duration, callback func(now time.Time))
func (*Component_) MakeComp ¶ added in v0.2.0
func (c *Component_) MakeComp(compName string)
type Cookie ¶
type Cookie struct {
// contains filtered or unexported fields
}
Cookie is a "set-cookie" header that is sent to http client by http server.
func (*Cookie) SetHttpOnly ¶ added in v0.2.0
func (c *Cookie) SetHttpOnly()
func (*Cookie) SetSameSite ¶ added in v0.2.0
func (*Cookie) SetSameSiteLax ¶ added in v0.2.0
func (c *Cookie) SetSameSiteLax()
func (*Cookie) SetSameSiteNone ¶ added in v0.2.0
func (c *Cookie) SetSameSiteNone()
func (*Cookie) SetSameSiteStrict ¶ added in v0.2.0
func (c *Cookie) SetSameSiteStrict()
type Cronjob ¶
type Cronjob interface {
// Imports
Component
// Methods
Schedule() // runner
}
Cronjob component
type Cronjob_ ¶
type Cronjob_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Cronjob_ is a parent.
type FCGIBackend ¶ added in v0.2.2
type FCGIBackend struct {
// Parent
Backend_[*fcgiNode]
}
FCGIBackend is an FCGI backend.
func (*FCGIBackend) CreateNode ¶ added in v0.2.2
func (b *FCGIBackend) CreateNode(compName string) Node
func (*FCGIBackend) FetchExchan ¶ added in v0.2.2
func (b *FCGIBackend) FetchExchan(httpReq ServerRequest) (*fcgiExchan, error)
func (*FCGIBackend) OnConfigure ¶ added in v0.2.2
func (b *FCGIBackend) OnConfigure()
func (*FCGIBackend) OnPrepare ¶ added in v0.2.2
func (b *FCGIBackend) OnPrepare()
func (*FCGIBackend) StoreExchan ¶ added in v0.2.2
func (b *FCGIBackend) StoreExchan(exchan *fcgiExchan)
type FCGIProxyConfig ¶ added in v0.2.4
type FCGIProxyConfig struct {
HTTPProxyConfig // embeded
ScriptFilename []byte // for SCRIPT_FILENAME
IndexFile []byte // the file that will be used as index
}
FCGIProxyConfig
type Gate ¶ added in v0.2.0
type Gate interface {
// Methods
Shut() error
IsShut() bool
// contains filtered or unexported methods
}
Gate is the interface for all gates. Gates are not components.
type Gate_ ¶
type Gate_[S Server] struct { // contains filtered or unexported fields }
Gate_ is a parent.
func (*Gate_) ReadTimeout ¶ added in v0.2.1
func (*Gate_) WriteTimeout ¶ added in v0.2.1
type HTTP1Backend ¶
type HTTP1Backend struct {
// contains filtered or unexported fields
}
HTTP1Backend
func (*HTTP1Backend) AcquireStream ¶ added in v0.2.4
func (b *HTTP1Backend) AcquireStream(servReq ServerRequest) (BackendStream, error)
func (*HTTP1Backend) CreateNode ¶ added in v0.2.0
func (b *HTTP1Backend) CreateNode(compName string) Node
func (*HTTP1Backend) OnConfigure ¶ added in v0.2.0
func (b *HTTP1Backend) OnConfigure()
func (*HTTP1Backend) ReleaseStream ¶ added in v0.2.4
func (b *HTTP1Backend) ReleaseStream(backStream BackendStream)
type HTTP2Backend ¶
type HTTP2Backend struct {
// contains filtered or unexported fields
}
HTTP2Backend
func (*HTTP2Backend) AcquireStream ¶ added in v0.2.4
func (b *HTTP2Backend) AcquireStream(servReq ServerRequest) (BackendStream, error)
func (*HTTP2Backend) CreateNode ¶ added in v0.2.0
func (b *HTTP2Backend) CreateNode(compName string) Node
func (*HTTP2Backend) OnConfigure ¶ added in v0.2.0
func (b *HTTP2Backend) OnConfigure()
func (*HTTP2Backend) ReleaseStream ¶ added in v0.2.4
func (b *HTTP2Backend) ReleaseStream(backStream BackendStream)
type HTTP3Backend ¶
type HTTP3Backend struct {
// contains filtered or unexported fields
}
HTTP3Backend
func (*HTTP3Backend) AcquireStream ¶ added in v0.2.4
func (b *HTTP3Backend) AcquireStream(servReq ServerRequest) (BackendStream, error)
func (*HTTP3Backend) CreateNode ¶ added in v0.2.0
func (b *HTTP3Backend) CreateNode(compName string) Node
func (*HTTP3Backend) OnConfigure ¶ added in v0.2.0
func (b *HTTP3Backend) OnConfigure()
func (*HTTP3Backend) ReleaseStream ¶ added in v0.2.4
func (b *HTTP3Backend) ReleaseStream(backStream BackendStream)
type HTTPBackend ¶ added in v0.2.1
type HTTPBackend interface {
// Imports
Backend
// Methods
AcquireStream(servReq ServerRequest) (BackendStream, error)
ReleaseStream(backStream BackendStream)
}
HTTPBackend is the http backend.
type HTTPNode ¶ added in v0.2.1
type HTTPNode interface {
// Imports
Node
// contains filtered or unexported methods
}
HTTPNode is the http node.
type HTTPProxyConfig ¶ added in v0.2.4
type HTTPProxyConfig struct {
// Inbound, to origin servers
BufferClientContent bool
Hostname []byte // overrides client provided hostname
Colonport []byte // overrides client provided colonport
InboundViaName []byte
AppendPathPrefix []byte
AddRequestHeaders map[string]Value
DelRequestHeaders [][]byte
// Outbound, to user agents
BufferServerContent bool
OutboundViaName []byte
AddResponseHeaders map[string]Value
DelResponseHeaders [][]byte
}
HTTPProxyConfig
type HTTPServer ¶ added in v0.2.1
type HTTPServer interface {
// Imports
Server
// Methods
MaxConcurrentConnsPerGate() int32
// contains filtered or unexported methods
}
HTTPServer is the http server.
type Handle ¶
type Handle func(req ServerRequest, resp ServerResponse)
Handle is a function which handles an http request and gives an http response.
type Handlet ¶
type Handlet interface {
// Imports
Component
// Methods
IsProxy() bool // reverse proxies and origins are different, we must differentiate them
IsCache() bool // proxy caches and reverse proxies are different, we must differentiate them
Handle(req ServerRequest, resp ServerResponse) (handled bool)
}
Handlet component handles the incoming request and gives an outgoing response if the request is handled.
type Handlet_ ¶
type Handlet_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Handlet_ is a parent.
func (*Handlet_) Dispatch ¶ added in v0.2.0
func (h *Handlet_) Dispatch(req ServerRequest, resp ServerResponse, notFound Handle)
type Hcache ¶ added in v0.2.1
type Hcache interface {
// Imports
Component
// Methods
Maintain() // runner
// TODO: design good apis
Set(key []byte, hobject *Hobject)
Get(key []byte) (hobject *Hobject)
Del(key []byte) bool
}
Hcache component is the interface to storages of HTTP caching.
type Hcache_ ¶ added in v0.2.1
type Hcache_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Hcache_ is a parent.
type Hobject ¶
type Hobject struct {
// contains filtered or unexported fields
}
Hobject represents an HTTP object in Hcache.
type Hstate ¶ added in v0.2.1
type Hstate interface {
// Imports
Component
// Methods
Maintain() // runner
Set(sid []byte, sess *Session) error
Get(sid []byte) (sess *Session, err error)
Del(sid []byte) error
}
Hstate is the component interface to storages of HTTP states.
type Hstate_ ¶ added in v0.2.1
type Hstate_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Hstate_ is a parent.
type LogConfig ¶ added in v0.2.0
type LogConfig struct {
Target string // "/path/to/file.log", "1.2.3.4:5678", ...
Rotate string // "day", "hour", ...
Fields []string // ("uri", "status"), ...
BufSize int32 // size of log buffer
}
LogConfig
type Mapper ¶ added in v0.1.3
type Mapper interface {
FindHandle(req ServerRequest) Handle // called firstly
HandleName(req ServerRequest) string // called secondly
}
Mapper performs request mapping in handlets. Mappers are not components.
type Node ¶ added in v0.2.0
type Node interface {
// Imports
Component
// Methods
Maintain() // runner
// contains filtered or unexported methods
}
Node is a member of backend.
type Node_ ¶ added in v0.2.0
type Node_[B Backend] struct { // Parent Component_ // contains filtered or unexported fields }
Node_ is a parent.
func (*Node_[B]) DialTimeout ¶ added in v0.2.1
func (*Node_[B]) OnConfigure ¶ added in v0.2.0
func (n *Node_[B]) OnConfigure()
func (*Node_[B]) OnShutdown ¶ added in v0.2.0
func (n *Node_[B]) OnShutdown()
func (*Node_) ReadTimeout ¶ added in v0.2.1
func (*Node_) WriteTimeout ¶ added in v0.2.1
type Piece ¶
type Piece struct {
// contains filtered or unexported fields
}
Piece is a member of content chain.
type QConn ¶
type QConn struct {
// contains filtered or unexported fields
}
QConn is a backend-side quix connection to quixNode.
func (*QConn) DialStream ¶ added in v0.2.2
func (*QConn) MakeTempName ¶ added in v0.2.0
type QStream ¶ added in v0.1.4
type QStream struct {
// contains filtered or unexported fields
}
QStream is a bidirectional stream of QConn.
type QUIXBackend ¶ added in v0.2.0
type QUIXBackend struct {
// Parent
Backend_[*quixNode]
}
QUIXBackend component.
func (*QUIXBackend) CreateNode ¶ added in v0.2.0
func (b *QUIXBackend) CreateNode(compName string) Node
func (*QUIXBackend) DialStream ¶ added in v0.2.2
func (b *QUIXBackend) DialStream() (*QStream, error)
func (*QUIXBackend) OnConfigure ¶ added in v0.2.0
func (b *QUIXBackend) OnConfigure()
func (*QUIXBackend) OnPrepare ¶ added in v0.2.0
func (b *QUIXBackend) OnPrepare()
type QUIXConn ¶ added in v0.2.0
type QUIXConn struct {
// contains filtered or unexported fields
}
QUIXConn is a QUIX connection coming from QUIXRouter.
func (*QUIXConn) MakeTempName ¶ added in v0.2.0
type QUIXDealet ¶ added in v0.2.0
type QUIXDealet interface {
// Imports
Component
// Methods
DealWith(conn *QUIXConn, stream *QUIXStream) (dealt bool)
}
QUIXDealet
type QUIXDealet_ ¶ added in v0.2.0
type QUIXDealet_ struct {
// contains filtered or unexported fields
}
QUIXDealet_ is a parent.
func (*QUIXDealet_) OnCreate ¶ added in v0.2.1
func (d *QUIXDealet_) OnCreate(compName string, stage *Stage)
type QUIXRouter ¶ added in v0.2.0
type QUIXRouter struct {
// contains filtered or unexported fields
}
QUIXRouter
func (*QUIXRouter) MaxConcurrentConnsPerGate ¶ added in v0.2.1
func (r *QUIXRouter) MaxConcurrentConnsPerGate() int32
func (*QUIXRouter) MaxConcurrentStreamsPerConn ¶ added in v0.2.1
func (h *QUIXRouter) MaxConcurrentStreamsPerConn() int32
func (*QUIXRouter) MaxCumulativeStreamsPerConn ¶ added in v0.2.1
func (h *QUIXRouter) MaxCumulativeStreamsPerConn() int32
func (*QUIXRouter) OnConfigure ¶ added in v0.2.0
func (r *QUIXRouter) OnConfigure()
func (*QUIXRouter) OnPrepare ¶ added in v0.2.0
func (r *QUIXRouter) OnPrepare()
func (*QUIXRouter) Serve ¶ added in v0.2.0
func (r *QUIXRouter) Serve()
type QUIXStream ¶ added in v0.2.0
type QUIXStream struct {
// contains filtered or unexported fields
}
QUIXStream
type RPCServer ¶ added in v0.2.0
type RPCServer interface {
// Imports
Server
// Methods
BindServices()
}
RPCServer
type Range ¶ added in v0.2.0
type Range struct {
From, Last int64 // [From:Last], inclusive
}
Range defines a range.
type Region ¶ added in v0.2.0
type Region struct {
// contains filtered or unexported fields
}
Region
type Reviser ¶
type Reviser interface {
// Imports
Component
// Methods
ID() uint8
Rank() int8 // 0-31 (with 0-15 as tunable, 16-31 as fixed)
// For incoming requests, either sized or vague
BeforeRecv(req ServerRequest, resp ServerResponse) // for sized content
BeforeDraw(req ServerRequest, resp ServerResponse) // for vague content
OnInput(req ServerRequest, resp ServerResponse, input *Chain) bool // for both sized and vague
FinishDraw(req ServerRequest, resp ServerResponse) // for vague content
// For outgoing responses, either sized or vague
BeforeSend(req ServerRequest, resp ServerResponse) // for sized content
BeforeEcho(req ServerRequest, resp ServerResponse) // for vague content
OnOutput(req ServerRequest, resp ServerResponse, output *Chain) // for both sized and vague
FinishEcho(req ServerRequest, resp ServerResponse) // for vague content
// contains filtered or unexported methods
}
Reviser component revises incoming requests and outgoing responses.
type Reviser_ ¶
type Reviser_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Reviser_ is a parent.
type Rule ¶
type Rule struct {
// Parent
Component_
// contains filtered or unexported fields
}
Rule component defines a rule for matching requests and handlets.
func (*Rule) OnConfigure ¶ added in v0.2.0
func (r *Rule) OnConfigure()
func (*Rule) OnShutdown ¶ added in v0.2.0
func (r *Rule) OnShutdown()
type SCGIBackend ¶ added in v0.2.2
type SCGIBackend struct {
// Parent
Backend_[*scgiNode]
}
SCGIBackend
func (*SCGIBackend) CreateNode ¶ added in v0.2.2
func (b *SCGIBackend) CreateNode(compName string) Node
func (*SCGIBackend) Dial ¶ added in v0.2.4
func (b *SCGIBackend) Dial(httpReq ServerRequest) (*scgiExchan, error)
func (*SCGIBackend) OnConfigure ¶ added in v0.2.2
func (b *SCGIBackend) OnConfigure()
func (*SCGIBackend) OnPrepare ¶ added in v0.2.2
func (b *SCGIBackend) OnPrepare()
type SCGIProxyConfig ¶ added in v0.2.4
type SCGIProxyConfig struct {
HTTPProxyConfig // embeded
}
SCGIProxyConfig
type Server ¶
type Server interface {
// Imports
Component
// Methods
Serve() // runner
// contains filtered or unexported methods
}
Server component. A Server has a group of Gates.
type ServerRequest ¶ added in v0.2.2
type ServerRequest interface {
RemoteAddr() net.Addr
Webapp() *Webapp
IsAsteriskOptions() bool // OPTIONS *
VersionCode() uint8
IsHTTP1() bool
IsHTTP1_0() bool
IsHTTP1_1() bool
IsHTTP2() bool
IsHTTP3() bool
Version() string // HTTP/1.0, HTTP/1.1, HTTP/2, HTTP/3
RiskyVersion() []byte
SchemeCode() uint8 // SchemeHTTP, SchemeHTTPS
IsHTTP() bool
IsHTTPS() bool
Scheme() string // http, https
RiskyScheme() []byte
IsGET() bool
IsHEAD() bool
IsPOST() bool
IsPUT() bool
IsDELETE() bool
IsCONNECT() bool
IsOPTIONS() bool
IsTRACE() bool
Method() string // GET, POST, ...
RiskyMethod() []byte
Authority() string // hostname[:port]
RiskyAuthority() []byte // hostname[:port]
Hostname() string // hostname
RiskyHostname() []byte // hostname
Colonport() string // :port
RiskyColonport() []byte // :port
URI() string // /encodedPath?queryString
RiskyURI() []byte // /encodedPath?queryString
Path() string // /decodedPath
RiskyPath() []byte // /decodedPath
EncodedPath() string // /encodedPath
RiskyEncodedPath() []byte // /encodedPath
QueryString() string // including '?' if query string exists, otherwise empty
RiskyQueryString() []byte // including '?' if query string exists, otherwise empty
HasQueries() bool
AllQueries() (queries [][2]string)
Q(name string) string
Qstr(name string, defaultValue string) string
Qint(name string, defaultValue int) int
Query(name string) (value string, ok bool)
RiskyQuery(name string) (value []byte, ok bool)
Queries(name string) (values []string, ok bool)
HasQuery(name string) bool
DelQuery(name string) (deleted bool)
AddQuery(name string, value string) bool
HasHeaders() bool
AllHeaderLines() (headerLines [][2]string)
H(name string) string
Hstr(name string, defaultValue string) string
Hint(name string, defaultValue int) int
Header(name string) (value string, ok bool)
RiskyHeader(name string) (value []byte, ok bool)
Headers(name string) (values []string, ok bool)
HasHeader(name string) bool
DelHeader(name string) (deleted bool)
AddHeader(name string, value string) bool
UserAgent() string
RiskyUserAgent() []byte
ContentType() string
RiskyContentType() []byte
ContentIsEncoded() bool
ContentSize() int64
RiskyContentLength() []byte
AcceptTrailers() bool
EvalPreconditions(date int64, etag []byte, asOrigin bool) (status int16, normal bool)
HasIfRange() bool
EvalIfRange(date int64, etag []byte, asOrigin bool) (canRange bool)
HasRanges() bool
EvalRanges(size int64) []Range
HasCookies() bool
AllCookies() (cookies [][2]string)
C(name string) string
Cstr(name string, defaultValue string) string
Cint(name string, defaultValue int) int
Cookie(name string) (value string, ok bool)
RiskyCookie(name string) (value []byte, ok bool)
Cookies(name string) (values []string, ok bool)
HasCookie(name string) bool
DelCookie(name string) (deleted bool)
AddCookie(name string, value string) bool
SetRecvTimeout(timeout time.Duration) // to defend against slowloris attack
HasContent() bool // true if content exists
IsVague() bool // true if content exists and is not sized
Content() string
RiskyContent() []byte
HasForms() bool
AllForms() (forms [][2]string)
F(name string) string
Fstr(name string, defaultValue string) string
Fint(name string, defaultValue int) int
Form(name string) (value string, ok bool)
RiskyForm(name string) (value []byte, ok bool)
Forms(name string) (values []string, ok bool)
HasForm(name string) bool
AddForm(name string, value string) bool
HasUpfiles() bool
AllUpfiles() (upfiles []*Upfile)
U(name string) *Upfile
Upfile(name string) (upfile *Upfile, ok bool)
Upfiles(name string) (upfiles []*Upfile, ok bool)
HasUpfile(name string) bool
HasTrailers() bool
AllTrailerLines() (trailerLines [][2]string)
T(name string) string
Tstr(name string, defaultValue string) string
Tint(name string, defaultValue int) int
Trailer(name string) (value string, ok bool)
RiskyTrailer(name string) (value []byte, ok bool)
Trailers(name string) (values []string, ok bool)
HasTrailer(name string) bool
DelTrailer(name string) (deleted bool)
AddTrailer(name string, value string) bool
RiskyMake(size int) []byte
// contains filtered or unexported methods
}
ServerRequest is the server-side http request.
type ServerResponse ¶ added in v0.2.2
type ServerResponse interface {
Request() ServerRequest
SetStatus(status int16) error
Status() int16
MakeETagFrom(date int64, size int64) ([]byte, bool) // with `""`
SetExpires(expires int64) bool
SetLastModified(lastModified int64) bool
AddContentType(contentType string) bool
AddContentTypeBytes(contentType []byte) bool
AddHTTPSRedirection(authority string) bool
AddHostnameRedirection(hostname string) bool
AddDirectoryRedirection() bool
AddCookie(cookie *Cookie) bool
AddHeader(name string, value string) bool
AddHeaderBytes(name []byte, value []byte) bool
Header(name string) (value string, ok bool)
HasHeader(name string) bool
DelHeader(name string) bool
DelHeaderBytes(name []byte) bool
IsSent() bool
SetSendTimeout(timeout time.Duration) // to defend against slowloris attack
Send(content string) error
SendBytes(content []byte) error
SendFile(contentPath string) error
SendJSON(content any) error
SendBadRequest(content []byte) error // 400
SendForbidden(content []byte) error // 403
SendNotFound(content []byte) error // 404
SendMethodNotAllowed(allow string, content []byte) error // 405
SendNotAcceptable(content []byte) error // 406
SendUnsupportedMediaType(acceptEncoding string, accept string, content []byte) error // 415
SendRangeNotSatisfiable(contentSize int64, content []byte) error // 416
SendInternalServerError(content []byte) error // 500
SendNotImplemented(content []byte) error // 501
SendBadGateway(content []byte) error // 502
SendGatewayTimeout(content []byte) error // 504
Echo(chunk string) error
EchoBytes(chunk []byte) error
EchoFile(chunkPath string) error
AddTrailer(name string, value string) bool
AddTrailerBytes(name []byte, value []byte) bool
// contains filtered or unexported methods
}
ServerResponse is the server-side http response.
type ServerSocket ¶ added in v0.2.2
type ServerSocket interface {
// TODO
Read(dst []byte) (int, error)
Write(src []byte) (int, error)
Close() error
}
ServerSocket is the server-side webSocket.
type Server_ ¶
type Server_[G Gate] struct { // Parent Component_ // contains filtered or unexported fields }
Server_ is a parent.
func (*Server_[G]) ColonportBytes ¶ added in v0.2.1
func (*Server_[G]) OnConfigure ¶ added in v0.2.0
func (s *Server_[G]) OnConfigure()
func (*Server_[G]) OnShutdown ¶ added in v0.2.0
func (s *Server_[G]) OnShutdown()
func (*Server_) ReadTimeout ¶ added in v0.2.0
func (*Server_) WriteTimeout ¶ added in v0.2.0
type Service ¶ added in v0.2.0
type Service struct {
// Parent
Component_
// contains filtered or unexported fields
}
Service is the RPC service.
func (*Service) BindServer ¶ added in v0.2.0
func (*Service) OnConfigure ¶ added in v0.2.0
func (s *Service) OnConfigure()
func (*Service) OnShutdown ¶ added in v0.2.0
func (s *Service) OnShutdown()
type Session ¶
type Session struct {
// TODO
ID [40]byte // session id
Secret [40]byte // secret key
Created int64 // unix time
Expires int64 // unix time
Role int8 // 0: default, >0: user defined values
Device int8 // terminal device type
// contains filtered or unexported fields
}
Session is an HTTP session in hstate.
type Socklet ¶
type Socklet interface {
// Imports
Component
// Methods
IsProxy() bool // reverse proxies and origin servers are different, we must differentiate them
Serve(req ServerRequest, sock ServerSocket)
}
Socklet component handles the webSocket.
type Socklet_ ¶
type Socklet_ struct {
// Parent
Component_
// contains filtered or unexported fields
}
Socklet_ is a parent.
type Stage ¶
type Stage struct {
// Parent
Component_
// contains filtered or unexported fields
}
Stage represents a running stage in the worker process.
A worker process may have many stages in its lifetime, especially when new configuration is applied, a new stage is created, or the old one is told to quit.
func StageFromFile ¶ added in v0.2.0
func StageFromText ¶ added in v0.2.0
func (*Stage) DecBackend ¶ added in v0.2.4
func (s *Stage) DecBackend()
func (*Stage) DecCronjob ¶ added in v0.2.4
func (s *Stage) DecCronjob()
func (*Stage) DecService ¶ added in v0.2.4
func (s *Stage) DecService()
func (*Stage) OnConfigure ¶ added in v0.2.0
func (s *Stage) OnConfigure()
func (*Stage) OnShutdown ¶ added in v0.2.0
func (s *Stage) OnShutdown()
func (*Stage) ProfGoroutine ¶ added in v0.2.0
func (s *Stage) ProfGoroutine()
func (*Stage) ProfThread ¶ added in v0.2.0
func (s *Stage) ProfThread()
func (*Stage) QUIXRouter ¶ added in v0.2.0
func (s *Stage) QUIXRouter(compName string) *QUIXRouter
func (*Stage) TCPXRouter ¶ added in v0.2.0
func (s *Stage) TCPXRouter(compName string) *TCPXRouter
func (*Stage) UDPXRouter ¶ added in v0.2.0
func (s *Stage) UDPXRouter(compName string) *UDPXRouter
type TCPXBackend ¶ added in v0.2.0
type TCPXBackend struct {
// Parent
Backend_[*tcpxNode]
}
TCPXBackend component.
func (*TCPXBackend) CreateNode ¶ added in v0.2.0
func (b *TCPXBackend) CreateNode(compName string) Node
func (*TCPXBackend) Dial ¶ added in v0.2.0
func (b *TCPXBackend) Dial() (*TConn, error)
func (*TCPXBackend) OnConfigure ¶ added in v0.2.0
func (b *TCPXBackend) OnConfigure()
func (*TCPXBackend) OnPrepare ¶ added in v0.2.0
func (b *TCPXBackend) OnPrepare()
type TCPXConn ¶ added in v0.2.0
type TCPXConn struct {
// contains filtered or unexported fields
}
TCPXConn is a TCPX connection coming from TCPXRouter.
func (*TCPXConn) CloseWrite ¶ added in v0.2.0
func (c *TCPXConn) CloseWrite()
func (*TCPXConn) MakeTempName ¶ added in v0.2.0
func (*TCPXConn) SetReadDeadline ¶ added in v0.2.0
func (c *TCPXConn) SetReadDeadline() error
func (*TCPXConn) SetWriteDeadline ¶ added in v0.2.0
func (c *TCPXConn) SetWriteDeadline() error
type TCPXDealet ¶ added in v0.2.0
TCPXDealet
type TCPXDealet_ ¶ added in v0.2.0
type TCPXDealet_ struct {
// contains filtered or unexported fields
}
TCPXDealet_ is a parent.
func (*TCPXDealet_) OnCreate ¶ added in v0.2.1
func (d *TCPXDealet_) OnCreate(compName string, stage *Stage)
type TCPXRouter ¶ added in v0.2.0
type TCPXRouter struct {
// contains filtered or unexported fields
}
TCPXRouter
func (*TCPXRouter) MaxConcurrentConnsPerGate ¶ added in v0.2.1
func (r *TCPXRouter) MaxConcurrentConnsPerGate() int32
func (*TCPXRouter) OnConfigure ¶ added in v0.2.0
func (r *TCPXRouter) OnConfigure()
func (*TCPXRouter) OnPrepare ¶ added in v0.2.0
func (r *TCPXRouter) OnPrepare()
func (*TCPXRouter) Serve ¶ added in v0.2.0
func (r *TCPXRouter) Serve()
type TConn ¶
type TConn struct {
// contains filtered or unexported fields
}
TConn is a backend-side connection to tcpxNode.
func (*TConn) CloseWrite ¶ added in v0.2.1
func (c *TConn) CloseWrite()
func (*TConn) MakeTempName ¶ added in v0.2.0
func (*TConn) SetReadDeadline ¶ added in v0.2.1
func (c *TConn) SetReadDeadline() error
func (*TConn) SetWriteDeadline ¶ added in v0.2.1
func (c *TConn) SetWriteDeadline() error
type UConn ¶
type UConn struct {
// contains filtered or unexported fields
}
UConn
func (*UConn) MakeTempName ¶ added in v0.2.0
type UDPXBackend ¶ added in v0.2.0
type UDPXBackend struct {
// Parent
Backend_[*udpxNode]
}
UDPXBackend component.
func (*UDPXBackend) CreateNode ¶ added in v0.2.0
func (b *UDPXBackend) CreateNode(compName string) Node
func (*UDPXBackend) Dial ¶ added in v0.2.0
func (b *UDPXBackend) Dial() (*UConn, error)
func (*UDPXBackend) OnConfigure ¶ added in v0.2.0
func (b *UDPXBackend) OnConfigure()
func (*UDPXBackend) OnPrepare ¶ added in v0.2.0
func (b *UDPXBackend) OnPrepare()
type UDPXConn ¶ added in v0.2.0
type UDPXConn struct {
// contains filtered or unexported fields
}
UDPXConn
func (*UDPXConn) MakeTempName ¶ added in v0.2.0
type UDPXDealet ¶ added in v0.2.0
UDPXDealet
type UDPXDealet_ ¶ added in v0.2.0
type UDPXDealet_ struct {
// contains filtered or unexported fields
}
UDPXDealet_ is a parent.
func (*UDPXDealet_) OnCreate ¶ added in v0.2.1
func (d *UDPXDealet_) OnCreate(compName string, stage *Stage)
type UDPXRouter ¶ added in v0.2.0
type UDPXRouter struct {
// contains filtered or unexported fields
}
UDPXRouter
func (*UDPXRouter) OnConfigure ¶ added in v0.2.0
func (r *UDPXRouter) OnConfigure()
func (*UDPXRouter) OnPrepare ¶ added in v0.2.0
func (r *UDPXRouter) OnPrepare()
func (*UDPXRouter) Serve ¶ added in v0.2.0
func (r *UDPXRouter) Serve()
type Upfile ¶ added in v0.2.0
type Upfile struct {
// contains filtered or unexported fields
}
Upfile is a file uploaded by http client and used by http server.
type Value ¶ added in v0.2.0
type Value struct {
// contains filtered or unexported fields
}
Value is a value in config file.
func (*Value) IsDuration ¶ added in v0.2.0
func (*Value) IsVariable ¶ added in v0.2.0
func (*Value) StringDict ¶ added in v0.2.0
func (*Value) StringList ¶ added in v0.2.0
func (*Value) StringListN ¶ added in v0.2.0
type Webapp ¶ added in v0.2.0
type Webapp struct {
// Parent
Component_
// contains filtered or unexported fields
}
Webapp is the Web application.
func (*Webapp) AddSetting ¶ added in v0.2.0
func (*Webapp) DecHandlet ¶ added in v0.2.4
func (a *Webapp) DecHandlet()
func (*Webapp) DecReviser ¶ added in v0.2.4
func (a *Webapp) DecReviser()
func (*Webapp) DecSocklet ¶ added in v0.2.4
func (a *Webapp) DecSocklet()
func (*Webapp) OnConfigure ¶ added in v0.2.0
func (a *Webapp) OnConfigure()
func (*Webapp) OnShutdown ¶ added in v0.2.0
func (a *Webapp) OnShutdown()
Source Files
¶
- common.go
- components.go
- config.go
- cronjobs.go
- fixtures.go
- hemi.go
- logger.go
- mix.go
- mix_backend.go
- mix_general.go
- mix_server.go
- net.go
- net_quix_backend.go
- net_quix_general.go
- net_quix_proxy.go
- net_quix_router.go
- net_tcpx_backend.go
- net_tcpx_general.go
- net_tcpx_proxy.go
- net_tcpx_router.go
- net_udpx_backend.go
- net_udpx_general.go
- net_udpx_proxy.go
- net_udpx_router.go
- rpc.go
- rpc_client_hrpc.go
- rpc_general_hrpc.go
- rpc_server_hrpc.go
- web.go
- web_backend_fcgi.go
- web_backend_http.go
- web_backend_http1.go
- web_backend_http2.go
- web_backend_http3.go
- web_backend_scgi.go
- web_element_http.go
- web_element_http1.go
- web_element_http2.go
- web_element_http3.go
- web_general_http.go
- web_general_http1.go
- web_general_http2.go
- web_general_http3.go
- web_handlet_cgi.go
- web_handlet_favicon.go
- web_handlet_rewriter.go
- web_handlet_static.go
- web_proxy_fcgi.go
- web_proxy_http.go
- web_proxy_scgi.go
- web_proxy_sock.go
- web_server_http.go
- web_server_http1.go
- web_server_http2.go
- web_server_http3.go