Documentation ¶
Index ¶
- Constants
- func BaseDir() string
- func BugExitf(format string, args ...any)
- func BugExitln(args ...any)
- func Debug() int32
- func EnvExitf(format string, args ...any)
- func EnvExitln(args ...any)
- func Error(args ...any)
- func Errorf(format string, args ...any)
- func Errorln(args ...any)
- func Get16K() []byte
- func Get4K() []byte
- func Get64K1() []byte
- func GetNK(n int64) []byte
- func LogsDir() string
- func Print(args ...any)
- func Printf(format string, args ...any)
- func Println(args ...any)
- func PutNK(p []byte)
- func RegisterAppInit(name string, init func(app *App) error)
- func RegisterBackend(sign string, create func(name string, stage *Stage) Backend)
- func RegisterCronjob(sign string, create func(name string, stage *Stage) Cronjob)
- func RegisterHandlet(sign string, create func(name string, stage *Stage, app *App) Handlet)
- func RegisterQUICFilter(sign string, ...)
- func RegisterReviser(sign string, create func(name string, stage *Stage, app *App) Reviser)
- func RegisterRunner(sign string, create func(name string, stage *Stage) Runner)
- func RegisterServer(sign string, create func(name string, stage *Stage) Server)
- func RegisterSocklet(sign string, create func(name string, stage *Stage, app *App) Socklet)
- func RegisterStater(sign string, create func(name string, stage *Stage) Stater)
- func RegisterStorer(sign string, create func(name string, stage *Stage) Storer)
- func RegisterSvcInit(name string, init func(svc *Svc) error)
- func RegisterTCPSFilter(sign string, ...)
- func RegisterUDPSFilter(sign string, ...)
- func SetBaseDir(dir string)
- func SetDebug(level int32)
- func SetLogsDir(dir string)
- func SetTempDir(dir string)
- func SetVarsDir(dir string)
- func TempDir() string
- func UseExitf(format string, args ...any)
- func UseExitln(args ...any)
- func VarsDir() string
- type App
- func (a *App) AddSetting(name string, value string)
- func (a *App) Handlet(name string) Handlet
- func (w *App) IncSub(n int)
- func (a *App) Log(str string)
- func (a *App) Logf(format string, args ...any)
- func (a *App) Logln(str string)
- func (s *App) Loop(interval time.Duration, callback func(now time.Time))
- func (a *App) OnConfigure()
- func (a *App) OnPrepare()
- func (a *App) OnShutdown()
- func (a *App) Reviser(name string) Reviser
- func (a *App) Rule(name string) *Rule
- func (s *App) SaveContentFilesDir() string
- func (a *App) Setting(name string) (value string, ok bool)
- func (a *App) Socklet(name string) Socklet
- func (w *App) SubDone()
- func (w *App) WaitSubs()
- type Backend
- type Backend_
- type Bundlet
- type Chain
- type Component
- type Component_
- func (c *Component_) ConfigureBool(name string, prop *bool, defaultValue bool)
- func (c *Component_) ConfigureBytes(name string, prop *[]byte, check func(value []byte) error, defaultValue []byte)
- func (c *Component_) ConfigureBytesList(name string, prop *[][]byte, check func(value [][]byte) error, ...)
- func (c *Component_) ConfigureDuration(name string, prop *time.Duration, check func(value time.Duration) error, ...)
- func (c *Component_) ConfigureInt(name string, prop *int, check func(value int) error, defaultValue int)
- func (c *Component_) ConfigureInt16(name string, prop *int16, check func(value int16) error, defaultValue int16)
- func (c *Component_) ConfigureInt32(name string, prop *int32, check func(value int32) error, defaultValue int32)
- func (c *Component_) ConfigureInt64(name string, prop *int64, check func(value int64) error, defaultValue int64)
- func (c *Component_) ConfigureInt8(name string, prop *int8, check func(value int8) error, defaultValue int8)
- func (c *Component_) ConfigureString(name string, prop *string, check func(value string) error, defaultValue string)
- func (c *Component_) ConfigureStringDict(name string, prop *map[string]string, ...)
- func (c *Component_) ConfigureStringList(name string, prop *[]string, check func(value []string) error, ...)
- func (c *Component_) Find(name string) (value Value, ok bool)
- func (w *Component_) IncSub(n int)
- func (s *Component_) Loop(interval time.Duration, callback func(now time.Time))
- func (c *Component_) MakeComp(name string)
- func (c *Component_) Name() string
- func (c *Component_) Prop(name string) (value Value, ok bool)
- func (w *Component_) SubDone()
- func (w *Component_) WaitSubs()
- type Conn
- type Conn_
- 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 int64)
- 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 GRPCBridge
- type Gate
- type Gate_
- func (g *Gate_) Address() string
- func (g *Gate_) DecConns() int32
- func (g *Gate_) ID() int32
- func (w *Gate_) IncSub(n int)
- func (g *Gate_) Init(stage *Stage, id int32, address string, maxConns int32)
- func (g *Gate_) IsShut() bool
- func (g *Gate_) MarkShut()
- func (g *Gate_) ReachLimit() bool
- func (g *Gate_) Stage() *Stage
- func (w *Gate_) SubDone()
- func (w *Gate_) WaitSubs()
- type H1Conn
- type H1Request
- func (r *H1Request) AddCookie(name string, value string) bool
- func (r *H1Request) Response() clientResponse
- func (r *H1Request) SetIfModifiedSince(since int64) bool
- func (r *H1Request) SetIfUnmodifiedSince(since int64) bool
- func (r *H1Request) SetMethodURI(method string, uri string, hasContent bool) bool
- type H1Response
- func (r *H1Response) C(name string) string
- func (r *H1Response) Content() string
- func (r *H1Response) Cookie(name string) (value string, ok bool)
- func (r *H1Response) HasContent() bool
- func (r *H1Response) HasCookie(name string) bool
- func (r *H1Response) HasCookies() bool
- func (r *H1Response) Status() int16
- func (r *H1Response) UnsafeContent() []byte
- func (r *H1Response) UnsafeCookie(name []byte) (value []byte, ok bool)
- type H1Socket
- type H1Stream
- func (s *H1Stream) ExecuteExchan() error
- func (s *H1Stream) ExecuteSocket() *H1Socket
- func (s *H1Stream) ExecuteTCPTun()
- func (s *H1Stream) ExecuteUDPTun()
- func (s *H1Stream) ForwardProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool) error
- func (s *H1Stream) Request() *H1Request
- func (s *H1Stream) Response() *H1Response
- func (s *H1Stream) ReverseProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool) error
- type H2Conn
- type H2Request
- func (r *H2Request) AddCookie(name string, value string) bool
- func (r *H2Request) Response() clientResponse
- func (r *H2Request) SetIfModifiedSince(since int64) bool
- func (r *H2Request) SetIfUnmodifiedSince(since int64) bool
- func (r *H2Request) SetMethodURI(method string, uri string, hasContent bool) bool
- type H2Response
- func (r *H2Response) C(name string) string
- func (r *H2Response) Content() string
- func (r *H2Response) Cookie(name string) (value string, ok bool)
- func (r *H2Response) HasContent() bool
- func (r *H2Response) HasCookie(name string) bool
- func (r *H2Response) HasCookies() bool
- func (r *H2Response) Status() int16
- func (r *H2Response) UnsafeContent() []byte
- func (r *H2Response) UnsafeCookie(name []byte) (value []byte, ok bool)
- type H2Socket
- type H2Stream
- func (s *H2Stream) ExecuteExchan() error
- func (s *H2Stream) ExecuteSocket() *H2Socket
- func (s *H2Stream) ExecuteTCPTun()
- func (s *H2Stream) ExecuteUDPTun()
- func (s *H2Stream) ForwardProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- func (s *H2Stream) Request() *H2Request
- func (s *H2Stream) Response() *H2Response
- func (s *H2Stream) ReverseProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- type H3Conn
- type H3Request
- func (r *H3Request) AddCookie(name string, value string) bool
- func (r *H3Request) Response() clientResponse
- func (r *H3Request) SetIfModifiedSince(since int64) bool
- func (r *H3Request) SetIfUnmodifiedSince(since int64) bool
- func (r *H3Request) SetMethodURI(method string, uri string, hasContent bool) bool
- type H3Response
- func (r *H3Response) C(name string) string
- func (r *H3Response) Content() string
- func (r *H3Response) Cookie(name string) (value string, ok bool)
- func (r *H3Response) HasContent() bool
- func (r *H3Response) HasCookie(name string) bool
- func (r *H3Response) HasCookies() bool
- func (r *H3Response) Status() int16
- func (r *H3Response) UnsafeContent() []byte
- func (r *H3Response) UnsafeCookie(name []byte) (value []byte, ok bool)
- type H3Socket
- type H3Stream
- func (s *H3Stream) ExecuteExchan() error
- func (s *H3Stream) ExecuteSocket() *H3Socket
- func (s *H3Stream) ExecuteTCPTun()
- func (s *H3Stream) ExecuteUDPTun()
- func (s *H3Stream) ForwardProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- func (s *H3Stream) Request() *H3Request
- func (s *H3Stream) Response() *H3Response
- func (s *H3Stream) ReverseProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- type HCall
- type HExchan
- func (x *HExchan) ExecuteExchan() error
- func (x *HExchan) ForwardProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- func (x *HExchan) Request() *HRequest
- func (x *HExchan) Response() *HResponse
- func (x *HExchan) ReverseProxy(req Request, resp Response, bufferClientContent bool, bufferServerContent bool)
- type HRPCBackend
- type HRPCOutgate
- type HReq
- type HRequest
- func (r *HRequest) AddCookie(name string, value string) bool
- func (r *HRequest) Response() clientResponse
- func (r *HRequest) SetIfModifiedSince(since int64) bool
- func (r *HRequest) SetIfUnmodifiedSince(since int64) bool
- func (r *HRequest) SetMethodURI(method string, uri string, hasContent bool) bool
- type HResp
- type HResponse
- func (r *HResponse) C(name string) string
- func (r *HResponse) Content() string
- func (r *HResponse) Cookie(name string) (value string, ok bool)
- func (r *HResponse) HasContent() bool
- func (r *HResponse) HasCookie(name string) bool
- func (r *HResponse) HasCookies() bool
- func (r *HResponse) Status() int16
- func (r *HResponse) UnsafeContent() []byte
- func (r *HResponse) UnsafeCookie(name []byte) (value []byte, ok bool)
- type HTTP1Backend
- type HTTP1Outgate
- type HTTP2Backend
- type HTTP2Outgate
- type HTTP3Backend
- type HTTP3Outgate
- type HWEBBackend
- type HWEBOutgate
- type Handle
- type Handlet
- type Handlet_
- func (h *Handlet_) Dispatch(req Request, resp Response, notFound Handle)
- func (w *Handlet_) IncSub(n int)
- func (h *Handlet_) IsCache() bool
- func (h *Handlet_) IsProxy() bool
- func (s *Handlet_) Loop(interval time.Duration, callback func(now time.Time))
- func (w *Handlet_) SubDone()
- func (h *Handlet_) UseRouter(handlet Handlet, router Router)
- func (w *Handlet_) WaitSubs()
- type Hobject
- type Node
- type Node_
- type Piece
- type QConnection
- type QOneway
- type QStream
- type QUDSBackend
- func (c *QUDSBackend) AliveTimeout() time.Duration
- func (b *QUDSBackend) Dial() (*XConnection, error)
- func (b *QUDSBackend) FetchConnection() (*XConnection, error)
- func (s *QUDSBackend) MaxStreamsPerConn() int32
- func (b *QUDSBackend) OnConfigure()
- func (b *QUDSBackend) OnPrepare()
- func (c *QUDSBackend) OnShutdown()
- func (c *QUDSBackend) ReadTimeout() time.Duration
- func (c *QUDSBackend) Stage() *Stage
- func (b *QUDSBackend) StoreConnection(xConnection *XConnection)
- func (c *QUDSBackend) TLSMode() bool
- func (c *QUDSBackend) WriteTimeout() time.Duration
- type QUDSOutgate
- func (f *QUDSOutgate) Dial(address string) (*XConnection, error)
- func (f *QUDSOutgate) FetchConnection(address string)
- func (s *QUDSOutgate) MaxStreamsPerConn() int32
- func (f *QUDSOutgate) OnConfigure()
- func (f *QUDSOutgate) OnPrepare()
- func (f *QUDSOutgate) StoreConnection(xConnection *XConnection)
- type QUICBackend
- func (c *QUICBackend) AliveTimeout() time.Duration
- func (b *QUICBackend) Dial() (*QConnection, error)
- func (b *QUICBackend) FetchConnection() (*QConnection, error)
- func (s *QUICBackend) MaxStreamsPerConn() int32
- func (b *QUICBackend) OnConfigure()
- func (b *QUICBackend) OnPrepare()
- func (c *QUICBackend) OnShutdown()
- func (c *QUICBackend) ReadTimeout() time.Duration
- func (c *QUICBackend) Stage() *Stage
- func (b *QUICBackend) StoreConnection(qConnection *QConnection)
- func (c *QUICBackend) TLSMode() bool
- func (c *QUICBackend) WriteTimeout() time.Duration
- type QUICConnection
- type QUICFilter
- type QUICFilter_
- type QUICMesher
- type QUICOutgate
- func (f *QUICOutgate) Dial(address string) (*QConnection, error)
- func (f *QUICOutgate) FetchConnection(address string)
- func (s *QUICOutgate) MaxStreamsPerConn() int32
- func (f *QUICOutgate) OnConfigure()
- func (f *QUICOutgate) OnPrepare()
- func (f *QUICOutgate) StoreConnection(qConnection *QConnection)
- type QUICStream
- type Region
- type Req
- type Request
- type Resp
- type Response
- type Reviser
- type Reviser_
- type Router
- type Rule
- type Runner
- type Server
- type Server_
- func (s *Server_) Address() string
- func (s *Server_) ColonPort() string
- func (s *Server_) ColonPortBytes() []byte
- func (w *Server_) IncSub(n int)
- func (s *Server_) Loop(interval time.Duration, callback func(now time.Time))
- func (s *Server_) MaxConnsPerGate() int32
- func (s *Server_) NumGates() int32
- func (s *Server_) OnConfigure()
- func (s *Server_) OnCreate(name string, stage *Stage)
- func (s *Server_) OnPrepare()
- func (s *Server_) ReadTimeout() time.Duration
- func (s *Server_) Stage() *Stage
- func (w *Server_) SubDone()
- func (s *Server_) TLSMode() bool
- func (w *Server_) WaitSubs()
- func (s *Server_) WriteTimeout() time.Duration
- type Session
- type Socket
- type Socklet
- type Socklet_
- type Stage
- func (s *Stage) App(name string) *App
- func (s *Stage) Backend(name string) Backend
- func (s *Stage) Clock() *clockFixture
- func (s *Stage) Cronjob(name string) Cronjob
- func (s *Stage) Fcache() *fcacheFixture
- func (s *Stage) HRPCOutgate() *HRPCOutgate
- func (s *Stage) HTTP1Outgate() *HTTP1Outgate
- func (s *Stage) HTTP2Outgate() *HTTP2Outgate
- func (s *Stage) HTTP3Outgate() *HTTP3Outgate
- func (s *Stage) HWEBOutgate() *HWEBOutgate
- func (s *Stage) ID() int32
- func (w *Stage) IncSub(n int)
- func (s *Stage) Loop(interval time.Duration, callback func(now time.Time))
- 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) QUDSOutgate() *QUDSOutgate
- func (s *Stage) QUICMesher(name string) *QUICMesher
- func (s *Stage) QUICOutgate() *QUICOutgate
- func (s *Stage) Quit()
- func (s *Stage) Resolv() *resolvFixture
- func (s *Stage) Runner(name string) Runner
- func (s *Stage) Server(name string) Server
- func (s *Stage) Start(id int32)
- func (s *Stage) Stater(name string) Stater
- func (s *Stage) Storer(name string) Storer
- func (w *Stage) SubDone()
- func (s *Stage) Svc(name string) *Svc
- func (s *Stage) TCPSMesher(name string) *TCPSMesher
- func (s *Stage) TCPSOutgate() *TCPSOutgate
- func (s *Stage) TUDSOutgate() *TUDSOutgate
- func (s *Stage) UDPSMesher(name string) *UDPSMesher
- func (s *Stage) UDPSOutgate() *UDPSOutgate
- func (s *Stage) UUDSOutgate() *UUDSOutgate
- func (w *Stage) WaitSubs()
- type Stater
- type Stater_
- type Storer
- type Storer_
- type Svc
- func (s *Svc) BindServer(server rpcServer)
- func (w *Svc) IncSub(n int)
- func (s *Svc) Log(str string)
- func (s *Svc) Logf(format string, args ...any)
- func (s *Svc) Logln(str string)
- func (s *Svc) Loop(interval time.Duration, callback func(now time.Time))
- func (s *Svc) OnConfigure()
- func (s *Svc) OnPrepare()
- func (s *Svc) OnShutdown()
- func (s *Svc) Servers() []rpcServer
- func (w *Svc) SubDone()
- func (w *Svc) WaitSubs()
- type TCPSBackend
- func (c *TCPSBackend) AliveTimeout() time.Duration
- func (b *TCPSBackend) Dial() (wireConn, error)
- func (b *TCPSBackend) DialTCPS() (*TConn, error)
- func (b *TCPSBackend) FetchConn() (wireConn, error)
- func (b *TCPSBackend) FetchTConn() (*TConn, error)
- func (s *TCPSBackend) MaxStreamsPerConn() int32
- func (b *TCPSBackend) OnConfigure()
- func (b *TCPSBackend) OnPrepare()
- func (c *TCPSBackend) OnShutdown()
- func (c *TCPSBackend) ReadTimeout() time.Duration
- func (c *TCPSBackend) Stage() *Stage
- func (b *TCPSBackend) StoreConn(conn wireConn)
- func (b *TCPSBackend) StoreTConn(tConn *TConn)
- func (c *TCPSBackend) TLSMode() bool
- func (c *TCPSBackend) WriteTimeout() time.Duration
- type TCPSConn
- type TCPSFilter
- type TCPSFilter_
- type TCPSMesher
- type TCPSOutgate
- type TConn
- func (c *TConn) Close() error
- func (c *TConn) CloseWrite() error
- func (c *TConn) IsBroken() bool
- func (c *TConn) MakeTempName(p []byte, unixTime int64) (from int, edge int)
- func (c *TConn) MarkBroken()
- func (c *TConn) Read(p []byte) (n int, err error)
- func (c *TConn) ReadAtLeast(p []byte, min int) (n int, err error)
- func (c *TConn) ReadFull(p []byte) (n int, err error)
- func (c *TConn) SetReadDeadline(deadline time.Time) error
- func (c *TConn) SetWriteDeadline(deadline time.Time) error
- func (c *TConn) TCPConn() *net.TCPConn
- func (c *TConn) TLSConn() *tls.Conn
- func (c *TConn) Write(p []byte) (n int, err error)
- func (c *TConn) Writev(vector *net.Buffers) (int64, error)
- type TUDSBackend
- func (c *TUDSBackend) AliveTimeout() time.Duration
- func (b *TUDSBackend) Dial() (wireConn, error)
- func (b *TUDSBackend) DialTUDS() (*XConn, error)
- func (b *TUDSBackend) FetchConn() (wireConn, error)
- func (b *TUDSBackend) FetchXConn() (*XConn, error)
- func (s *TUDSBackend) MaxStreamsPerConn() int32
- func (b *TUDSBackend) OnConfigure()
- func (b *TUDSBackend) OnPrepare()
- func (c *TUDSBackend) OnShutdown()
- func (c *TUDSBackend) ReadTimeout() time.Duration
- func (c *TUDSBackend) Stage() *Stage
- func (b *TUDSBackend) StoreConn(conn wireConn)
- func (b *TUDSBackend) StoreXConn(xConn *XConn)
- func (c *TUDSBackend) TLSMode() bool
- func (c *TUDSBackend) WriteTimeout() time.Duration
- type TUDSOutgate
- type ThriftBridge
- type UDPSBackend
- func (c *UDPSBackend) AliveTimeout() time.Duration
- func (b *UDPSBackend) FetchLink() (*ULink, error)
- func (b *UDPSBackend) Link() (*ULink, error)
- func (b *UDPSBackend) OnConfigure()
- func (b *UDPSBackend) OnPrepare()
- func (c *UDPSBackend) OnShutdown()
- func (c *UDPSBackend) ReadTimeout() time.Duration
- func (c *UDPSBackend) Stage() *Stage
- func (b *UDPSBackend) StoreLink(uLink *ULink)
- func (c *UDPSBackend) TLSMode() bool
- func (c *UDPSBackend) WriteTimeout() time.Duration
- type UDPSFilter
- type UDPSFilter_
- type UDPSLink
- type UDPSMesher
- type UDPSOutgate
- type ULink
- type UUDSBackend
- func (c *UUDSBackend) AliveTimeout() time.Duration
- func (b *UUDSBackend) FetchLink() (*XLink, error)
- func (b *UUDSBackend) Link() (*XLink, error)
- func (b *UUDSBackend) OnConfigure()
- func (b *UUDSBackend) OnPrepare()
- func (c *UUDSBackend) OnShutdown()
- func (c *UUDSBackend) ReadTimeout() time.Duration
- func (c *UUDSBackend) Stage() *Stage
- func (b *UUDSBackend) StoreLink(xLink *XLink)
- func (c *UUDSBackend) TLSMode() bool
- func (c *UUDSBackend) WriteTimeout() time.Duration
- type UUDSOutgate
- type Upload
- 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) 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) Int16() (i16 int16, ok bool)
- func (v *Value) Int32() (i32 int32, ok bool)
- func (v *Value) Int64() (i64 int64, ok bool)
- func (v *Value) Int8() (i8 int8, 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) 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) Uint32() (u32 uint32, ok bool)
- type XConn
- func (c *XConn) Close() error
- func (c *XConn) CloseWrite() error
- func (c *XConn) IsBroken() bool
- func (c *XConn) MakeTempName(p []byte, unixTime int64) (from int, edge int)
- func (c *XConn) MarkBroken()
- func (c *XConn) Read(p []byte) (n int, err error)
- func (c *XConn) ReadAtLeast(p []byte, min int) (n int, err error)
- func (c *XConn) ReadFull(p []byte) (n int, err error)
- func (c *XConn) SetReadDeadline(deadline time.Time) error
- func (c *XConn) SetWriteDeadline(deadline time.Time) error
- func (c *XConn) UnixConn() *net.UnixConn
- func (c *XConn) Write(p []byte) (n int, err error)
- func (c *XConn) Writev(vector *net.Buffers) (int64, error)
- type XConnection
- type XLink
- type XOneway
- type XStream
Constants ¶
const ( K = 1 << 10 M = 1 << 20 G = 1 << 30 T = 1 << 40 )
const ( CodeBug = 20 CodeUse = 21 CodeEnv = 22 )
const ( Version1_0 = 0 // must be 0 Version1_1 = 1 Version2 = 2 Version3 = 3 )
const ( SchemeHTTP = 0 // must be 0 SchemeHTTPS = 1 )
const ( MethodGET = 0x00000001 MethodHEAD = 0x00000002 MethodPOST = 0x00000004 MethodPUT = 0x00000008 MethodDELETE = 0x00000010 MethodCONNECT = 0x00000020 MethodOPTIONS = 0x00000040 MethodTRACE = 0x00000080 )
const ( // 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.1.7"
Variables ¶
This section is empty.
Functions ¶
func RegisterAppInit ¶
func RegisterBackend ¶
func RegisterCronjob ¶
func RegisterHandlet ¶
func RegisterQUICFilter ¶ added in v0.1.0
func RegisterQUICFilter(sign string, create func(name string, stage *Stage, mesher *QUICMesher) QUICFilter)
func RegisterReviser ¶
func RegisterRunner ¶ added in v0.1.2
func RegisterServer ¶
func RegisterSocklet ¶
func RegisterStater ¶
func RegisterStorer ¶ added in v0.1.6
func RegisterSvcInit ¶
func RegisterTCPSFilter ¶ added in v0.1.0
func RegisterTCPSFilter(sign string, create func(name string, stage *Stage, mesher *TCPSMesher) TCPSFilter)
func RegisterUDPSFilter ¶ added in v0.1.0
func RegisterUDPSFilter(sign string, create func(name string, stage *Stage, mesher *UDPSMesher) UDPSFilter)
func SetBaseDir ¶
func SetBaseDir(dir string)
func SetLogsDir ¶
func SetLogsDir(dir string)
func SetTempDir ¶
func SetTempDir(dir string)
func SetVarsDir ¶
func SetVarsDir(dir string)
Types ¶
type App ¶
type App struct { // Mixins Component_ // contains filtered or unexported fields }
App is the Web application.
func (*App) AddSetting ¶
func (*App) OnConfigure ¶
func (a *App) OnConfigure()
func (*App) OnShutdown ¶
func (a *App) OnShutdown()
func (*App) SaveContentFilesDir ¶
func (s *App) SaveContentFilesDir() string
type Backend ¶
type Backend interface { // Imports Component // Methods Maintain() // goroutine // contains filtered or unexported methods }
Backend is a group of nodes.
type Backend_ ¶
type Backend_[N Node] struct { // contains filtered or unexported fields }
Backend_ is the mixin for backends.
func (*Backend_) AliveTimeout ¶
func (*Backend_) OnShutdown ¶
func (c *Backend_) OnShutdown()
func (*Backend_) ReadTimeout ¶
func (*Backend_) WriteTimeout ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain is a linked-list of pieces.
type Component ¶
type Component interface { MakeComp(name string) OnShutdown() SubDone() // sub components call this Name() string OnConfigure() Find(name string) (value Value, ok bool) Prop(name string) (value Value, ok bool) ConfigureBool(name string, prop *bool, defaultValue bool) ConfigureInt64(name string, prop *int64, check func(value int64) error, defaultValue int64) ConfigureInt32(name string, prop *int32, check func(value int32) error, defaultValue int32) ConfigureInt16(name string, prop *int16, check func(value int16) error, defaultValue int16) ConfigureInt8(name string, prop *int8, check func(value int8) error, defaultValue int8) ConfigureInt(name string, prop *int, check func(value int) error, defaultValue int) ConfigureString(name string, prop *string, check func(value string) error, defaultValue string) ConfigureBytes(name string, prop *[]byte, check func(value []byte) error, defaultValue []byte) ConfigureDuration(name string, prop *time.Duration, check func(value time.Duration) error, defaultValue time.Duration) ConfigureStringList(name string, prop *[]string, check func(value []string) error, defaultValue []string) ConfigureBytesList(name string, prop *[][]byte, check func(value [][]byte) error, defaultValue [][]byte) ConfigureStringDict(name string, prop *map[string]string, check func(value map[string]string) error, defaultValue map[string]string) OnPrepare() // contains filtered or unexported methods }
Component is the interface for all components.
type Component_ ¶
type Component_ struct {
// contains filtered or unexported fields
}
Component_ is the mixin for all components.
func (*Component_) ConfigureBool ¶
func (c *Component_) ConfigureBool(name string, prop *bool, defaultValue bool)
func (*Component_) ConfigureBytes ¶
func (*Component_) ConfigureBytesList ¶
func (*Component_) ConfigureDuration ¶
func (*Component_) ConfigureInt ¶
func (*Component_) ConfigureInt16 ¶
func (*Component_) ConfigureInt32 ¶
func (*Component_) ConfigureInt64 ¶
func (*Component_) ConfigureInt8 ¶
func (*Component_) ConfigureString ¶
func (*Component_) ConfigureStringDict ¶
func (*Component_) ConfigureStringList ¶
func (*Component_) MakeComp ¶
func (c *Component_) MakeComp(name string)
func (*Component_) Name ¶
func (c *Component_) Name() string
type Conn ¶ added in v0.1.6
type Conn interface {
// contains filtered or unexported methods
}
Conn is the client conns.
type Conn_ ¶ added in v0.1.6
type Conn_ struct {
// contains filtered or unexported fields
}
Conn_ is the mixin for client conns.
type Cookie ¶
type Cookie struct {
// contains filtered or unexported fields
}
Cookie is a "set-cookie" sent to client.
func (*Cookie) SetHttpOnly ¶
func (c *Cookie) SetHttpOnly()
func (*Cookie) SetSameSite ¶
func (*Cookie) SetSameSiteLax ¶
func (c *Cookie) SetSameSiteLax()
func (*Cookie) SetSameSiteNone ¶
func (c *Cookie) SetSameSiteNone()
func (*Cookie) SetSameSiteStrict ¶
func (c *Cookie) SetSameSiteStrict()
type Cronjob ¶
type Cronjob interface { // Imports Component // Methods Schedule() // goroutine }
Cronjob component
type Cronjob_ ¶
type Cronjob_ struct { // Mixins Component_ }
Cronjob_ is the mixin for all cronjobs.
type GRPCBridge ¶ added in v0.1.2
type GRPCBridge interface { // Methods GRPCServer() any // may be a *grpc.Server // contains filtered or unexported methods }
GRPCBridge is the interface for all gRPC server bridges. Users can implement their own gRPC server in exts, which may embeds *grpc.Server and must implements the GRPCBridge interface.
type Gate ¶
type Gate interface { // Methods ID() int32 IsShut() bool // contains filtered or unexported methods }
Gate is the interface for all gates.
type Gate_ ¶
type Gate_ struct {
// contains filtered or unexported fields
}
Gate_ is a mixin for mesher gates and server gates.
func (*Gate_) ReachLimit ¶
type H1Conn ¶
type H1Conn struct {
// contains filtered or unexported fields
}
H1Conn is the client-side HTTP/1 connection.
type H1Request ¶
type H1Request struct {
// contains filtered or unexported fields
}
H1Request is the client-side HTTP/1 request.
func (*H1Request) SetIfModifiedSince ¶
func (*H1Request) SetIfUnmodifiedSince ¶
type H1Response ¶
type H1Response struct {
// contains filtered or unexported fields
}
H1Response is the client-side HTTP/1 response.
func (*H1Response) HasContent ¶
func (r *H1Response) HasContent() bool
func (*H1Response) HasCookies ¶
func (r *H1Response) HasCookies() bool
func (*H1Response) UnsafeContent ¶
func (r *H1Response) UnsafeContent() []byte
func (*H1Response) UnsafeCookie ¶
type H1Socket ¶
type H1Socket struct {
// contains filtered or unexported fields
}
H1Socket is the client-side HTTP/1 websocket.
type H1Stream ¶
type H1Stream struct {
// contains filtered or unexported fields
}
H1Stream is the client-side HTTP/1 stream.
func (*H1Stream) ExecuteExchan ¶ added in v0.1.3
func (*H1Stream) ExecuteSocket ¶
func (*H1Stream) ExecuteTCPTun ¶
func (s *H1Stream) ExecuteTCPTun()
func (*H1Stream) ExecuteUDPTun ¶
func (s *H1Stream) ExecuteUDPTun()
func (*H1Stream) ForwardProxy ¶
func (*H1Stream) Response ¶
func (s *H1Stream) Response() *H1Response
type H2Conn ¶
type H2Conn struct {
// contains filtered or unexported fields
}
H2Conn
func (*H2Conn) FetchStream ¶
func (*H2Conn) StoreStream ¶
type H2Request ¶
type H2Request struct {
// contains filtered or unexported fields
}
H2Request is the client-side HTTP/2 request.
func (*H2Request) SetIfModifiedSince ¶
func (*H2Request) SetIfUnmodifiedSince ¶
type H2Response ¶
type H2Response struct {
// contains filtered or unexported fields
}
H2Response is the client-side HTTP/2 response.
func (*H2Response) HasContent ¶
func (r *H2Response) HasContent() bool
func (*H2Response) HasCookies ¶
func (r *H2Response) HasCookies() bool
func (*H2Response) UnsafeContent ¶
func (r *H2Response) UnsafeContent() []byte
func (*H2Response) UnsafeCookie ¶
type H2Socket ¶
type H2Socket struct {
// contains filtered or unexported fields
}
H2Socket is the client-side HTTP/2 websocket.
type H2Stream ¶
type H2Stream struct {
// contains filtered or unexported fields
}
H2Stream
func (*H2Stream) ExecuteExchan ¶ added in v0.1.3
func (*H2Stream) ExecuteSocket ¶
func (*H2Stream) ExecuteTCPTun ¶
func (s *H2Stream) ExecuteTCPTun()
func (*H2Stream) ExecuteUDPTun ¶
func (s *H2Stream) ExecuteUDPTun()
func (*H2Stream) ForwardProxy ¶
func (*H2Stream) Response ¶
func (s *H2Stream) Response() *H2Response
type H3Conn ¶
type H3Conn struct {
// contains filtered or unexported fields
}
H3Conn
func (*H3Conn) FetchStream ¶
func (*H3Conn) StoreStream ¶
type H3Request ¶
type H3Request struct {
// contains filtered or unexported fields
}
H3Request is the client-side HTTP/3 request.
func (*H3Request) SetIfModifiedSince ¶
func (*H3Request) SetIfUnmodifiedSince ¶
type H3Response ¶
type H3Response struct {
// contains filtered or unexported fields
}
H3Response is the client-side HTTP/3 response.
func (*H3Response) HasContent ¶
func (r *H3Response) HasContent() bool
func (*H3Response) HasCookies ¶
func (r *H3Response) HasCookies() bool
func (*H3Response) UnsafeContent ¶
func (r *H3Response) UnsafeContent() []byte
func (*H3Response) UnsafeCookie ¶
type H3Socket ¶
type H3Socket struct {
// contains filtered or unexported fields
}
H3Socket is the client-side HTTP/3 websocket.
type H3Stream ¶
type H3Stream struct {
// contains filtered or unexported fields
}
H3Stream
func (*H3Stream) ExecuteExchan ¶ added in v0.1.3
func (*H3Stream) ExecuteSocket ¶
func (*H3Stream) ExecuteTCPTun ¶
func (s *H3Stream) ExecuteTCPTun()
func (*H3Stream) ExecuteUDPTun ¶
func (s *H3Stream) ExecuteUDPTun()
func (*H3Stream) ForwardProxy ¶
func (*H3Stream) Response ¶
func (s *H3Stream) Response() *H3Response
type HCall ¶ added in v0.1.5
type HCall struct {
// contains filtered or unexported fields
}
HCall is the client-side HRPC call.
type HExchan ¶ added in v0.1.3
type HExchan struct {
// contains filtered or unexported fields
}
HExchan is the client-side HWEB exchan.
func (*HExchan) ExecuteExchan ¶ added in v0.1.3
func (*HExchan) ForwardProxy ¶ added in v0.1.3
type HRPCBackend ¶ added in v0.1.5
type HRPCBackend struct {
// contains filtered or unexported fields
}
HRPCBackend
func (*HRPCBackend) OnConfigure ¶ added in v0.1.6
func (b *HRPCBackend) OnConfigure()
func (*HRPCBackend) OnPrepare ¶ added in v0.1.6
func (b *HRPCBackend) OnPrepare()
type HRPCOutgate ¶ added in v0.1.5
type HRPCOutgate struct {
// contains filtered or unexported fields
}
HRPCOutgate
func (*HRPCOutgate) OnConfigure ¶ added in v0.1.5
func (f *HRPCOutgate) OnConfigure()
func (*HRPCOutgate) OnPrepare ¶ added in v0.1.5
func (f *HRPCOutgate) OnPrepare()
type HReq ¶ added in v0.1.5
type HReq struct {
// contains filtered or unexported fields
}
HReq is the client-side HRPC request.
type HRequest ¶ added in v0.1.3
type HRequest struct {
// contains filtered or unexported fields
}
HRequest is the client-side HWEB request.
func (*HRequest) SetIfModifiedSince ¶ added in v0.1.3
func (*HRequest) SetIfUnmodifiedSince ¶ added in v0.1.3
type HResp ¶ added in v0.1.5
type HResp struct {
// contains filtered or unexported fields
}
HResp is the client-side HRPC response.
type HResponse ¶ added in v0.1.3
type HResponse struct {
// contains filtered or unexported fields
}
HResponse is the client-side HWEB response.
func (*HResponse) HasContent ¶ added in v0.1.3
func (r *HResponse) HasContent() bool
func (*HResponse) HasCookies ¶ added in v0.1.3
func (r *HResponse) HasCookies() bool
func (*HResponse) UnsafeContent ¶ added in v0.1.3
func (r *HResponse) UnsafeContent() []byte
func (*HResponse) UnsafeCookie ¶ added in v0.1.3
type HTTP1Backend ¶
type HTTP1Backend struct {
// contains filtered or unexported fields
}
HTTP1Backend
func (*HTTP1Backend) FetchConn ¶
func (b *HTTP1Backend) FetchConn() (*H1Conn, error)
func (*HTTP1Backend) OnConfigure ¶
func (b *HTTP1Backend) OnConfigure()
func (*HTTP1Backend) OnPrepare ¶
func (b *HTTP1Backend) OnPrepare()
func (*HTTP1Backend) StoreConn ¶
func (b *HTTP1Backend) StoreConn(conn *H1Conn)
type HTTP1Outgate ¶
type HTTP1Outgate struct {
// contains filtered or unexported fields
}
HTTP1Outgate
func (*HTTP1Outgate) Dial ¶
func (f *HTTP1Outgate) Dial(address string, tlsMode bool) (*H1Conn, error)
func (*HTTP1Outgate) OnConfigure ¶
func (f *HTTP1Outgate) OnConfigure()
func (*HTTP1Outgate) OnPrepare ¶
func (f *HTTP1Outgate) OnPrepare()
type HTTP2Backend ¶
type HTTP2Backend struct {
// contains filtered or unexported fields
}
HTTP2Backend
func (*HTTP2Backend) FetchConn ¶
func (b *HTTP2Backend) FetchConn() (*H2Conn, error)
func (*HTTP2Backend) OnConfigure ¶
func (b *HTTP2Backend) OnConfigure()
func (*HTTP2Backend) OnPrepare ¶
func (b *HTTP2Backend) OnPrepare()
func (*HTTP2Backend) StoreConn ¶
func (b *HTTP2Backend) StoreConn(conn *H2Conn)
type HTTP2Outgate ¶
type HTTP2Outgate struct {
// contains filtered or unexported fields
}
HTTP2Outgate
func (*HTTP2Outgate) FetchConn ¶
func (f *HTTP2Outgate) FetchConn(address string, tlsMode bool) (*H2Conn, error)
func (*HTTP2Outgate) OnConfigure ¶
func (f *HTTP2Outgate) OnConfigure()
func (*HTTP2Outgate) OnPrepare ¶
func (f *HTTP2Outgate) OnPrepare()
func (*HTTP2Outgate) StoreConn ¶
func (f *HTTP2Outgate) StoreConn(conn *H2Conn)
type HTTP3Backend ¶
type HTTP3Backend struct {
// contains filtered or unexported fields
}
HTTP3Backend
func (*HTTP3Backend) FetchConn ¶
func (b *HTTP3Backend) FetchConn() (*H3Conn, error)
func (*HTTP3Backend) OnConfigure ¶
func (b *HTTP3Backend) OnConfigure()
func (*HTTP3Backend) OnPrepare ¶
func (b *HTTP3Backend) OnPrepare()
func (*HTTP3Backend) StoreConn ¶
func (b *HTTP3Backend) StoreConn(conn *H3Conn)
type HTTP3Outgate ¶
type HTTP3Outgate struct {
// contains filtered or unexported fields
}
HTTP3Outgate
func (*HTTP3Outgate) FetchConn ¶
func (f *HTTP3Outgate) FetchConn(address string, tlsMode bool) (*H3Conn, error)
func (*HTTP3Outgate) OnConfigure ¶
func (f *HTTP3Outgate) OnConfigure()
func (*HTTP3Outgate) OnPrepare ¶
func (f *HTTP3Outgate) OnPrepare()
func (*HTTP3Outgate) StoreConn ¶
func (f *HTTP3Outgate) StoreConn(conn *H3Conn)
type HWEBBackend ¶ added in v0.1.3
type HWEBBackend struct {
// contains filtered or unexported fields
}
HWEBBackend
func (*HWEBBackend) OnConfigure ¶ added in v0.1.3
func (b *HWEBBackend) OnConfigure()
func (*HWEBBackend) OnPrepare ¶ added in v0.1.3
func (b *HWEBBackend) OnPrepare()
type HWEBOutgate ¶ added in v0.1.3
type HWEBOutgate struct {
// contains filtered or unexported fields
}
HWEBOutgate
func (*HWEBOutgate) OnConfigure ¶ added in v0.1.3
func (f *HWEBOutgate) OnConfigure()
func (*HWEBOutgate) OnPrepare ¶ added in v0.1.3
func (f *HWEBOutgate) OnPrepare()
type Handlet ¶
type Handlet interface { // Imports Component // Methods IsProxy() bool // proxies and origins are different, we must differentiate them IsCache() bool // caches and proxies are different, we must differentiate them Handle(req Request, resp Response) (next bool) }
Handlet component handles the incoming request and gives an outgoing response if the request is handled.
type Handlet_ ¶
type Handlet_ struct { // Mixins Component_ // contains filtered or unexported fields }
Handlet_ is the mixin for all handlets.
type Hobject ¶
type Hobject struct {
// contains filtered or unexported fields
}
Hobject is an HTTP object in storer
type Node ¶
type Node interface { Maintain() // goroutine // contains filtered or unexported methods }
Node is a member of backend.
type Node_ ¶
type Node_ struct {
// contains filtered or unexported fields
}
Node_ is a mixin for backend nodes.
type Piece ¶
type Piece struct {
// contains filtered or unexported fields
}
Piece is a member of content chain.
type QConnection ¶ added in v0.1.6
type QConnection struct { // Mixins Conn_ // contains filtered or unexported fields }
QConnection is a client-side connection to quicNode.
func (*QConnection) FetchOneway ¶ added in v0.1.6
func (c *QConnection) FetchOneway() *QOneway
func (*QConnection) FetchStream ¶ added in v0.1.6
func (c *QConnection) FetchStream() *QStream
func (*QConnection) StoreOneway ¶ added in v0.1.6
func (c *QConnection) StoreOneway(oneway *QOneway)
func (*QConnection) StoreStream ¶ added in v0.1.6
func (c *QConnection) StoreStream(stream *QStream)
type QOneway ¶
type QOneway struct {
// contains filtered or unexported fields
}
QOneway is a unidirectional stream of QConnection.
type QStream ¶
type QStream struct {
// contains filtered or unexported fields
}
QStream is a bidirectional stream of QConnection.
type QUDSBackend ¶ added in v0.1.5
type QUDSBackend struct { // Mixins Backend_[*qudsNode] // contains filtered or unexported fields }
QUDSBackend component.
func (*QUDSBackend) AliveTimeout ¶ added in v0.1.5
func (*QUDSBackend) Dial ¶ added in v0.1.5
func (b *QUDSBackend) Dial() (*XConnection, error)
func (*QUDSBackend) FetchConnection ¶ added in v0.1.6
func (b *QUDSBackend) FetchConnection() (*XConnection, error)
func (*QUDSBackend) MaxStreamsPerConn ¶ added in v0.1.5
func (s *QUDSBackend) MaxStreamsPerConn() int32
func (*QUDSBackend) OnConfigure ¶ added in v0.1.5
func (b *QUDSBackend) OnConfigure()
func (*QUDSBackend) OnPrepare ¶ added in v0.1.5
func (b *QUDSBackend) OnPrepare()
func (*QUDSBackend) OnShutdown ¶ added in v0.1.5
func (c *QUDSBackend) OnShutdown()
func (*QUDSBackend) ReadTimeout ¶ added in v0.1.5
func (*QUDSBackend) StoreConnection ¶ added in v0.1.6
func (b *QUDSBackend) StoreConnection(xConnection *XConnection)
func (*QUDSBackend) WriteTimeout ¶ added in v0.1.5
type QUDSOutgate ¶ added in v0.1.5
type QUDSOutgate struct {
// contains filtered or unexported fields
}
QUDSOutgate component.
func (*QUDSOutgate) Dial ¶ added in v0.1.5
func (f *QUDSOutgate) Dial(address string) (*XConnection, error)
func (*QUDSOutgate) FetchConnection ¶ added in v0.1.6
func (f *QUDSOutgate) FetchConnection(address string)
func (*QUDSOutgate) MaxStreamsPerConn ¶ added in v0.1.5
func (s *QUDSOutgate) MaxStreamsPerConn() int32
func (*QUDSOutgate) OnConfigure ¶ added in v0.1.5
func (f *QUDSOutgate) OnConfigure()
func (*QUDSOutgate) OnPrepare ¶ added in v0.1.5
func (f *QUDSOutgate) OnPrepare()
func (*QUDSOutgate) StoreConnection ¶ added in v0.1.6
func (f *QUDSOutgate) StoreConnection(xConnection *XConnection)
type QUICBackend ¶
type QUICBackend struct { // Mixins Backend_[*quicNode] // contains filtered or unexported fields }
QUICBackend component.
func (*QUICBackend) AliveTimeout ¶
func (*QUICBackend) Dial ¶
func (b *QUICBackend) Dial() (*QConnection, error)
func (*QUICBackend) FetchConnection ¶ added in v0.1.6
func (b *QUICBackend) FetchConnection() (*QConnection, error)
func (*QUICBackend) MaxStreamsPerConn ¶
func (s *QUICBackend) MaxStreamsPerConn() int32
func (*QUICBackend) OnConfigure ¶
func (b *QUICBackend) OnConfigure()
func (*QUICBackend) OnPrepare ¶
func (b *QUICBackend) OnPrepare()
func (*QUICBackend) OnShutdown ¶
func (c *QUICBackend) OnShutdown()
func (*QUICBackend) ReadTimeout ¶
func (*QUICBackend) StoreConnection ¶ added in v0.1.6
func (b *QUICBackend) StoreConnection(qConnection *QConnection)
func (*QUICBackend) WriteTimeout ¶
type QUICConnection ¶ added in v0.1.6
type QUICConnection struct {
// contains filtered or unexported fields
}
QUICConnection is the QUIC connection coming from QUICMesher.
func (*QUICConnection) Close ¶ added in v0.1.6
func (c *QUICConnection) Close() error
type QUICFilter ¶ added in v0.1.0
type QUICFilter interface { // Imports Component // Methods Deal(connection *QUICConnection, stream *QUICStream) (next bool) }
QUICFilter
type QUICFilter_ ¶ added in v0.1.0
type QUICFilter_ struct { // Mixins Component_ }
QUICFilter_
type QUICMesher ¶
type QUICMesher struct {
// contains filtered or unexported fields
}
QUICMesher
func (*QUICMesher) OnConfigure ¶
func (m *QUICMesher) OnConfigure()
func (*QUICMesher) OnPrepare ¶
func (m *QUICMesher) OnPrepare()
func (*QUICMesher) OnShutdown ¶
func (m *QUICMesher) OnShutdown()
type QUICOutgate ¶
type QUICOutgate struct {
// contains filtered or unexported fields
}
QUICOutgate component.
func (*QUICOutgate) Dial ¶
func (f *QUICOutgate) Dial(address string) (*QConnection, error)
func (*QUICOutgate) FetchConnection ¶ added in v0.1.6
func (f *QUICOutgate) FetchConnection(address string)
func (*QUICOutgate) MaxStreamsPerConn ¶
func (s *QUICOutgate) MaxStreamsPerConn() int32
func (*QUICOutgate) OnConfigure ¶
func (f *QUICOutgate) OnConfigure()
func (*QUICOutgate) OnPrepare ¶
func (f *QUICOutgate) OnPrepare()
func (*QUICOutgate) StoreConnection ¶ added in v0.1.6
func (f *QUICOutgate) StoreConnection(qConnection *QConnection)
type Request ¶
type Request interface { PeerAddr() net.Addr App() *App VersionCode() uint8 IsHTTP1_0() bool IsHTTP1_1() bool IsHTTP1() bool IsHTTP2() bool IsHTTP3() bool Version() string // HTTP/1.0, HTTP/1.1, HTTP/2, HTTP/3 SchemeCode() uint8 // SchemeHTTP, SchemeHTTPS IsHTTP() bool IsHTTPS() bool Scheme() string // http, https MethodCode() uint32 Method() string // GET, POST, ... IsGET() bool IsPOST() bool IsPUT() bool IsDELETE() bool IsAbsoluteForm() bool // TODO: what about HTTP/2 and HTTP/3? IsAsteriskOptions() bool // OPTIONS * Authority() string // hostname[:port] Hostname() string // hostname ColonPort() string // :port URI() string // /encodedPath?queryString Path() string // /path EncodedPath() string // /encodedPath QueryString() string // including '?' if query string exists, otherwise empty AddQuery(name string, value string) bool 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) Queries(name string) (values []string, ok bool) HasQuery(name string) bool DelQuery(name string) (deleted bool) AddHeader(name string, value string) bool HasHeaders() bool AllHeaders() (headers [][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) Headers(name string) (values []string, ok bool) HasHeader(name string) bool DelHeader(name string) (deleted bool) UserAgent() string ContentType() string ContentSize() int64 AcceptTrailers() bool TestConditions(modTime int64, etag []byte, asOrigin bool) (status int16, pass bool) // to test preconditons intentionally TestIfRanges(modTime int64, etag []byte, asOrigin bool) (pass bool) // to test preconditons intentionally AddCookie(name string, value string) bool 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) Cookies(name string) (values []string, ok bool) HasCookie(name string) bool DelCookie(name string) (deleted bool) SetRecvTimeout(timeout time.Duration) // to defend against slowloris attack HasContent() bool // true if content exists IsUnsized() bool // true if content exists and is not sized Content() string AddForm(name string, value string) bool 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) Forms(name string) (values []string, ok bool) HasForm(name string) bool HasUploads() bool AllUploads() (uploads []*Upload) U(name string) *Upload Upload(name string) (upload *Upload, ok bool) Uploads(name string) (uploads []*Upload, ok bool) HasUpload(name string) bool AddTrailer(name string, value string) bool HasTrailers() bool AllTrailers() (trailers [][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) Trailers(name string) (values []string, ok bool) HasTrailer(name string) bool DelTrailer(name string) (deleted bool) // Unsafe UnsafeMake(size int) []byte UnsafeVersion() []byte UnsafeScheme() []byte UnsafeMethod() []byte UnsafeAuthority() []byte // hostname[:port] UnsafeHostname() []byte // hostname UnsafeColonPort() []byte // :port UnsafeURI() []byte UnsafePath() []byte UnsafeEncodedPath() []byte UnsafeQueryString() []byte // including '?' if query string exists, otherwise empty UnsafeQuery(name string) (value []byte, ok bool) UnsafeHeader(name string) (value []byte, ok bool) UnsafeCookie(name string) (value []byte, ok bool) UnsafeUserAgent() []byte UnsafeContentLength() []byte UnsafeContentType() []byte UnsafeContent() []byte UnsafeForm(name string) (value []byte, ok bool) UnsafeTrailer(name string) (value []byte, ok bool) // contains filtered or unexported methods }
Request is the interface for *http[1-3]Request and *hwebRequest.
type Response ¶
type Response interface { Request() Request SetStatus(status int16) error Status() int16 MakeETagFrom(modTime int64, fileSize int64) ([]byte, bool) // with `""` SetExpires(expires int64) bool SetLastModified(lastModified int64) bool AddContentType(contentType string) bool AddHTTPSRedirection(authority string) bool AddHostnameRedirection(hostname string) bool AddDirectoryRedirection() bool SetCookie(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 SendJSON(content any) error SendFile(contentPath string) error SendBadRequest(content []byte) error // 400 SendForbidden(content []byte) error // 403 SendNotFound(content []byte) error // 404 SendMethodNotAllowed(allow string, content []byte) error // 405 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 }
Response is the interface for *http[1-3]Response and *hwebResponse.
type Reviser ¶
type Reviser interface { // Imports Component // Methods Rank() int8 // 0-31 (with 0-15 as tunable, 16-31 as fixed) BeforeRecv(req Request, resp Response) // for sized content OnRecv(req Request, resp Response, chain Chain) (Chain, bool) BeforeDraw(req Request, resp Response) // for unsized content OnDraw(req Request, resp Response, chain Chain) (Chain, bool) FinishDraw(req Request, resp Response) // for unsized content BeforeSend(req Request, resp Response) // for sized content OnSend(req Request, resp Response, content *Chain) BeforeEcho(req Request, resp Response) // for unsized content OnEcho(req Request, resp Response, chunks *Chain) FinishEcho(req Request, resp Response) // for unsized content // contains filtered or unexported methods }
Reviser component revises incoming requests and outgoing responses.
type Reviser_ ¶
type Reviser_ struct { // Mixins Component_ // contains filtered or unexported fields }
Reviser_ is the mixin for all revisers.
type Router ¶
type Router interface { FindHandle(req Request) Handle // firstly HandleName(req Request) string // secondly }
Router performs request mapping in handlets.
type Rule ¶
type Rule struct { // Mixins Component_ // contains filtered or unexported fields }
Rule component
func (*Rule) OnConfigure ¶
func (r *Rule) OnConfigure()
func (*Rule) OnShutdown ¶
func (r *Rule) OnShutdown()
type Runner ¶ added in v0.1.2
type Runner interface { // Imports Component // Methods Run() // goroutine }
Runner component.
Runners are plugins or addons for Hemi. Users can create their own runners.
type Server ¶
type Server interface { // Imports Component // Methods Serve() // goroutine Stage() *Stage TLSMode() bool ColonPort() string ColonPortBytes() []byte ReadTimeout() time.Duration WriteTimeout() time.Duration }
Server component.
type Server_ ¶
type Server_ struct { // Mixins Component_ // contains filtered or unexported fields }
Server_ is the mixin for all servers.
func (*Server_) ColonPortBytes ¶
func (*Server_) MaxConnsPerGate ¶
func (*Server_) OnConfigure ¶
func (s *Server_) OnConfigure()
func (*Server_) ReadTimeout ¶
func (*Server_) WriteTimeout ¶
type Session ¶
type Session struct { // TODO ID [40]byte // session id Secret [40]byte // secret Role int8 // 0: default, >0: app defined values Device int8 // terminal device type // contains filtered or unexported fields }
Session is an HTTP session in stater
type Socklet ¶
type Socklet interface { // Imports Component // Methods IsProxy() bool // proxys and origins are different, we must differentiate them Serve(req Request, sock Socket) }
Socklet component handles the websocket.
type Socklet_ ¶
type Socklet_ struct { // Mixins Component_ }
Socklet_ is the mixin for all socklets.
type Stage ¶
type Stage struct { // Mixins Component_ // contains filtered or unexported fields }
Stage represents a running stage in 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 (*Stage) HRPCOutgate ¶ added in v0.1.5
func (s *Stage) HRPCOutgate() *HRPCOutgate
func (*Stage) HTTP1Outgate ¶
func (s *Stage) HTTP1Outgate() *HTTP1Outgate
func (*Stage) HTTP2Outgate ¶
func (s *Stage) HTTP2Outgate() *HTTP2Outgate
func (*Stage) HTTP3Outgate ¶
func (s *Stage) HTTP3Outgate() *HTTP3Outgate
func (*Stage) HWEBOutgate ¶ added in v0.1.3
func (s *Stage) HWEBOutgate() *HWEBOutgate
func (*Stage) OnConfigure ¶
func (s *Stage) OnConfigure()
func (*Stage) OnShutdown ¶
func (s *Stage) OnShutdown()
func (*Stage) ProfGoroutine ¶
func (s *Stage) ProfGoroutine()
func (*Stage) ProfThread ¶
func (s *Stage) ProfThread()
func (*Stage) QUDSOutgate ¶ added in v0.1.5
func (s *Stage) QUDSOutgate() *QUDSOutgate
func (*Stage) QUICMesher ¶
func (s *Stage) QUICMesher(name string) *QUICMesher
func (*Stage) QUICOutgate ¶
func (s *Stage) QUICOutgate() *QUICOutgate
func (*Stage) TCPSMesher ¶
func (s *Stage) TCPSMesher(name string) *TCPSMesher
func (*Stage) TCPSOutgate ¶
func (s *Stage) TCPSOutgate() *TCPSOutgate
func (*Stage) TUDSOutgate ¶ added in v0.1.5
func (s *Stage) TUDSOutgate() *TUDSOutgate
func (*Stage) UDPSMesher ¶
func (s *Stage) UDPSMesher(name string) *UDPSMesher
func (*Stage) UDPSOutgate ¶
func (s *Stage) UDPSOutgate() *UDPSOutgate
func (*Stage) UUDSOutgate ¶ added in v0.1.5
func (s *Stage) UUDSOutgate() *UUDSOutgate
type Stater ¶
type Stater interface { // Imports Component // Methods Maintain() // goroutine Set(sid []byte, session *Session) Get(sid []byte) (session *Session) Del(sid []byte) bool }
Stater component is the interface to storages of HTTP states. See RFC 6265.
type Storer ¶ added in v0.1.6
type Storer interface { // Imports Component // Methods Maintain() // goroutine Set(key []byte, hobject *Hobject) Get(key []byte) (hobject *Hobject) Del(key []byte) bool }
Storer component is the interface to storages of HTTP caching. See RFC 9111.
type Storer_ ¶ added in v0.1.6
type Storer_ struct { // Mixins Component_ }
Storer_
type Svc ¶
type Svc struct { // Mixins Component_ // contains filtered or unexported fields }
Svc is the RPC service.
func (*Svc) BindServer ¶ added in v0.1.5
func (s *Svc) BindServer(server rpcServer)
func (*Svc) OnConfigure ¶
func (s *Svc) OnConfigure()
func (*Svc) OnShutdown ¶
func (s *Svc) OnShutdown()
type TCPSBackend ¶
type TCPSBackend struct { // Mixins Backend_[*tcpsNode] // contains filtered or unexported fields }
TCPSBackend component.
func (*TCPSBackend) AliveTimeout ¶
func (*TCPSBackend) Dial ¶
func (b *TCPSBackend) Dial() (wireConn, error)
func (*TCPSBackend) DialTCPS ¶ added in v0.1.6
func (b *TCPSBackend) DialTCPS() (*TConn, error)
func (*TCPSBackend) FetchConn ¶
func (b *TCPSBackend) FetchConn() (wireConn, error)
func (*TCPSBackend) FetchTConn ¶ added in v0.1.6
func (b *TCPSBackend) FetchTConn() (*TConn, error)
func (*TCPSBackend) MaxStreamsPerConn ¶
func (s *TCPSBackend) MaxStreamsPerConn() int32
func (*TCPSBackend) OnConfigure ¶
func (b *TCPSBackend) OnConfigure()
func (*TCPSBackend) OnPrepare ¶
func (b *TCPSBackend) OnPrepare()
func (*TCPSBackend) OnShutdown ¶
func (c *TCPSBackend) OnShutdown()
func (*TCPSBackend) ReadTimeout ¶
func (*TCPSBackend) StoreConn ¶
func (b *TCPSBackend) StoreConn(conn wireConn)
func (*TCPSBackend) StoreTConn ¶ added in v0.1.6
func (b *TCPSBackend) StoreTConn(tConn *TConn)
func (*TCPSBackend) WriteTimeout ¶
type TCPSConn ¶
type TCPSConn struct {
// contains filtered or unexported fields
}
TCPSConn is the TCP/TLS connection coming from TCPSMesher.
type TCPSFilter ¶ added in v0.1.0
TCPSFilter
type TCPSFilter_ ¶ added in v0.1.0
type TCPSFilter_ struct { // Mixins Component_ }
TCPSFilter_
type TCPSMesher ¶
type TCPSMesher struct {
// contains filtered or unexported fields
}
TCPSMesher
func (*TCPSMesher) OnConfigure ¶
func (m *TCPSMesher) OnConfigure()
func (*TCPSMesher) OnPrepare ¶
func (m *TCPSMesher) OnPrepare()
func (*TCPSMesher) OnShutdown ¶
func (m *TCPSMesher) OnShutdown()
type TCPSOutgate ¶
type TCPSOutgate struct {
// contains filtered or unexported fields
}
TCPSOutgate component.
func (*TCPSOutgate) MaxStreamsPerConn ¶
func (s *TCPSOutgate) MaxStreamsPerConn() int32
func (*TCPSOutgate) OnConfigure ¶
func (f *TCPSOutgate) OnConfigure()
func (*TCPSOutgate) OnPrepare ¶
func (f *TCPSOutgate) OnPrepare()
type TConn ¶
type TConn struct { // Mixins Conn_ // contains filtered or unexported fields }
TConn is a client-side connection to tcpsNode.
func (*TConn) CloseWrite ¶
func (*TConn) MakeTempName ¶
func (*TConn) MarkBroken ¶
func (c *TConn) MarkBroken()
type TUDSBackend ¶ added in v0.1.5
type TUDSBackend struct { // Mixins Backend_[*tudsNode] // contains filtered or unexported fields }
TUDSBackend component.
func (*TUDSBackend) AliveTimeout ¶ added in v0.1.5
func (*TUDSBackend) Dial ¶ added in v0.1.5
func (b *TUDSBackend) Dial() (wireConn, error)
func (*TUDSBackend) DialTUDS ¶ added in v0.1.6
func (b *TUDSBackend) DialTUDS() (*XConn, error)
func (*TUDSBackend) FetchConn ¶ added in v0.1.5
func (b *TUDSBackend) FetchConn() (wireConn, error)
func (*TUDSBackend) FetchXConn ¶ added in v0.1.6
func (b *TUDSBackend) FetchXConn() (*XConn, error)
func (*TUDSBackend) MaxStreamsPerConn ¶ added in v0.1.5
func (s *TUDSBackend) MaxStreamsPerConn() int32
func (*TUDSBackend) OnConfigure ¶ added in v0.1.5
func (b *TUDSBackend) OnConfigure()
func (*TUDSBackend) OnPrepare ¶ added in v0.1.5
func (b *TUDSBackend) OnPrepare()
func (*TUDSBackend) OnShutdown ¶ added in v0.1.5
func (c *TUDSBackend) OnShutdown()
func (*TUDSBackend) ReadTimeout ¶ added in v0.1.5
func (*TUDSBackend) StoreConn ¶ added in v0.1.5
func (b *TUDSBackend) StoreConn(conn wireConn)
func (*TUDSBackend) StoreXConn ¶ added in v0.1.6
func (b *TUDSBackend) StoreXConn(xConn *XConn)
func (*TUDSBackend) WriteTimeout ¶ added in v0.1.5
type TUDSOutgate ¶ added in v0.1.5
type TUDSOutgate struct {
// contains filtered or unexported fields
}
TUDSOutgate component.
func (*TUDSOutgate) Dial ¶ added in v0.1.5
func (f *TUDSOutgate) Dial(address string) (*XConn, error)
func (*TUDSOutgate) MaxStreamsPerConn ¶ added in v0.1.5
func (s *TUDSOutgate) MaxStreamsPerConn() int32
func (*TUDSOutgate) OnConfigure ¶ added in v0.1.5
func (f *TUDSOutgate) OnConfigure()
func (*TUDSOutgate) OnPrepare ¶ added in v0.1.5
func (f *TUDSOutgate) OnPrepare()
type ThriftBridge ¶ added in v0.1.2
type ThriftBridge interface { // Methods ThriftServer() any // may be a thrift.TServer? // contains filtered or unexported methods }
ThriftBridge is the interface for all Thrift server bridges. Users can implement their own Thrift server in exts, which may embeds thrift.TServer and must implements the ThriftBridge interface.
type UDPSBackend ¶
type UDPSBackend struct { // Mixins Backend_[*udpsNode] // contains filtered or unexported fields }
UDPSBackend component.
func (*UDPSBackend) AliveTimeout ¶
func (*UDPSBackend) FetchLink ¶ added in v0.1.3
func (b *UDPSBackend) FetchLink() (*ULink, error)
func (*UDPSBackend) Link ¶ added in v0.1.5
func (b *UDPSBackend) Link() (*ULink, error)
func (*UDPSBackend) OnConfigure ¶
func (b *UDPSBackend) OnConfigure()
func (*UDPSBackend) OnPrepare ¶
func (b *UDPSBackend) OnPrepare()
func (*UDPSBackend) OnShutdown ¶
func (c *UDPSBackend) OnShutdown()
func (*UDPSBackend) ReadTimeout ¶
func (*UDPSBackend) StoreLink ¶ added in v0.1.3
func (b *UDPSBackend) StoreLink(uLink *ULink)
func (*UDPSBackend) WriteTimeout ¶
type UDPSFilter ¶ added in v0.1.0
UDPSFilter
type UDPSFilter_ ¶ added in v0.1.0
type UDPSFilter_ struct { // Mixins Component_ }
UDPSFilter_
type UDPSLink ¶ added in v0.1.3
type UDPSLink struct {
// contains filtered or unexported fields
}
UDPSLink needs redesign, maybe datagram?
type UDPSMesher ¶
type UDPSMesher struct {
// contains filtered or unexported fields
}
UDPSMesher
func (*UDPSMesher) OnConfigure ¶
func (m *UDPSMesher) OnConfigure()
func (*UDPSMesher) OnPrepare ¶
func (m *UDPSMesher) OnPrepare()
func (*UDPSMesher) OnShutdown ¶
func (m *UDPSMesher) OnShutdown()
type UDPSOutgate ¶
type UDPSOutgate struct {
// contains filtered or unexported fields
}
UDPSOutgate component.
func (*UDPSOutgate) FetchLink ¶ added in v0.1.3
func (f *UDPSOutgate) FetchLink(address string, tlsMode bool) (*ULink, error)
func (*UDPSOutgate) OnConfigure ¶
func (f *UDPSOutgate) OnConfigure()
func (*UDPSOutgate) OnPrepare ¶
func (f *UDPSOutgate) OnPrepare()
func (*UDPSOutgate) StoreLink ¶ added in v0.1.3
func (f *UDPSOutgate) StoreLink(uLink *ULink)
type ULink ¶ added in v0.1.3
type ULink struct { // Mixins Conn_ // contains filtered or unexported fields }
ULink needs redesign, maybe datagram?
func (*ULink) SetReadDeadline ¶ added in v0.1.3
func (*ULink) SetWriteDeadline ¶ added in v0.1.3
type UUDSBackend ¶ added in v0.1.5
type UUDSBackend struct { // Mixins Backend_[*uudsNode] // contains filtered or unexported fields }
UUDSBackend component.
func (*UUDSBackend) AliveTimeout ¶ added in v0.1.5
func (*UUDSBackend) FetchLink ¶ added in v0.1.5
func (b *UUDSBackend) FetchLink() (*XLink, error)
func (*UUDSBackend) Link ¶ added in v0.1.5
func (b *UUDSBackend) Link() (*XLink, error)
func (*UUDSBackend) OnConfigure ¶ added in v0.1.5
func (b *UUDSBackend) OnConfigure()
func (*UUDSBackend) OnPrepare ¶ added in v0.1.5
func (b *UUDSBackend) OnPrepare()
func (*UUDSBackend) OnShutdown ¶ added in v0.1.5
func (c *UUDSBackend) OnShutdown()
func (*UUDSBackend) ReadTimeout ¶ added in v0.1.5
func (*UUDSBackend) StoreLink ¶ added in v0.1.5
func (b *UUDSBackend) StoreLink(xLink *XLink)
func (*UUDSBackend) WriteTimeout ¶ added in v0.1.5
type UUDSOutgate ¶ added in v0.1.5
type UUDSOutgate struct {
// contains filtered or unexported fields
}
UUDSOutgate component.
func (*UUDSOutgate) Dial ¶ added in v0.1.5
func (f *UUDSOutgate) Dial(address string, tlsMode bool) (*XLink, error)
func (*UUDSOutgate) FetchLink ¶ added in v0.1.5
func (f *UUDSOutgate) FetchLink(address string, tlsMode bool) (*XLink, error)
func (*UUDSOutgate) OnConfigure ¶ added in v0.1.5
func (f *UUDSOutgate) OnConfigure()
func (*UUDSOutgate) OnPrepare ¶ added in v0.1.5
func (f *UUDSOutgate) OnPrepare()
func (*UUDSOutgate) StoreLink ¶ added in v0.1.5
func (f *UUDSOutgate) StoreLink(xLink *XLink)
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
Upload is a file uploaded by client.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is a value in config file.
func (*Value) IsDuration ¶
func (*Value) StringList ¶
type XConn ¶ added in v0.1.0
type XConn struct { // Mixins Conn_ // contains filtered or unexported fields }
XConn is a client-side connection to tudsNode.
func (*XConn) CloseWrite ¶ added in v0.1.0
func (*XConn) MakeTempName ¶ added in v0.1.5
func (*XConn) MarkBroken ¶ added in v0.1.5
func (c *XConn) MarkBroken()
func (*XConn) ReadAtLeast ¶ added in v0.1.5
func (*XConn) SetReadDeadline ¶ added in v0.1.0
func (*XConn) SetWriteDeadline ¶ added in v0.1.0
type XConnection ¶ added in v0.1.6
type XConnection struct { // Mixins Conn_ // contains filtered or unexported fields }
XConnection is a client-side connection to qudsNode.
func (*XConnection) FetchOneway ¶ added in v0.1.6
func (c *XConnection) FetchOneway() *XOneway
func (*XConnection) FetchStream ¶ added in v0.1.6
func (c *XConnection) FetchStream() *XStream
func (*XConnection) StoreOneway ¶ added in v0.1.6
func (c *XConnection) StoreOneway(oneway *XOneway)
func (*XConnection) StoreStream ¶ added in v0.1.6
func (c *XConnection) StoreStream(stream *XStream)
type XLink ¶ added in v0.1.5
type XLink struct { // Mixins Conn_ // contains filtered or unexported fields }
XLink needs redesign, maybe datagram?
func (*XLink) SetReadDeadline ¶ added in v0.1.5
func (*XLink) SetWriteDeadline ¶ added in v0.1.5
type XOneway ¶ added in v0.1.6
type XOneway struct {
// contains filtered or unexported fields
}
XOneway is a unidirectional stream of XConnection.
Source Files ¶
- client.go
- client_quds.go
- client_quic.go
- client_tcps.go
- client_tuds.go
- client_udps.go
- client_uuds.go
- common.go
- component.go
- config.go
- cronjob.go
- fixture.go
- fixture_clock.go
- fixture_fcache.go
- fixture_resolv.go
- internal.go
- logger.go
- net.go
- net_proxy_quds.go
- net_proxy_quic.go
- net_proxy_tcps.go
- net_proxy_tuds.go
- net_proxy_udps.go
- net_proxy_uuds.go
- net_quic.go
- net_tcps.go
- net_udps.go
- rpc.go
- rpc_client.go
- rpc_client_hrpc.go
- rpc_define.go
- rpc_define_hrpc.go
- rpc_inout.go
- rpc_inout_hrpc.go
- rpc_proxy.go
- rpc_proxy_hrpc.go
- rpc_server.go
- rpc_server_grpc.go
- rpc_server_hrpc.go
- rpc_server_thrift.go
- server.go
- stater.go
- web.go
- web_client.go
- web_client_http1.go
- web_client_http2.go
- web_client_http3.go
- web_client_hweb.go
- web_define.go
- web_define_http1.go
- web_define_http2.go
- web_define_http3.go
- web_define_hweb.go
- web_inout.go
- web_inout_http1.go
- web_inout_http2.go
- web_inout_http3.go
- web_inout_hweb.go
- web_proxy.go
- web_proxy_ajp.go
- web_proxy_fcgi.go
- web_proxy_http1.go
- web_proxy_http2.go
- web_proxy_http3.go
- web_proxy_hweb.go
- web_proxy_uwsgi.go
- web_server.go
- web_server_http1.go
- web_server_http2.go
- web_server_http3.go
- web_server_hweb.go
- web_static.go
- web_storer.go