Documentation
¶
Index ¶
- Constants
- Variables
- func ByteCountSI(b uint64) string
- func CheckPasswordHash(password, hash string) bool
- func ConnSync(conn net.Conn, oconn net.Conn)
- func HashPassword(password string) (string, error)
- func RandString(n int) string
- func TrimLeftChar(s string) string
- type BufferedLookup
- type ByteCounterConn
- type Context
- type ContextSlot
- type GroupRegexp
- type HangContext
- type LookupFunc
- type NilContext
- type OneConn
- func (conn *OneConn) Close() error
- func (conn *OneConn) LocalAddr() net.Addr
- func (conn *OneConn) Read(p []byte) (i int, e error)
- func (conn *OneConn) RemoteAddr() net.Addr
- func (conn *OneConn) SetDeadline(t time.Time) error
- func (conn *OneConn) SetReadDeadline(t time.Time) error
- func (conn *OneConn) SetWriteDeadline(t time.Time) error
- func (conn *OneConn) Write(p []byte) (int, error)
- type RoConn
- func (conn *RoConn) Close() error
- func (conn *RoConn) LocalAddr() net.Addr
- func (conn *RoConn) Read(p []byte) (int, error)
- func (conn *RoConn) RemoteAddr() net.Addr
- func (conn *RoConn) SetDeadline(time.Time) error
- func (conn *RoConn) SetReadDeadline(time.Time) error
- func (conn *RoConn) SetWriteDeadline(time.Time) error
- func (conn *RoConn) Write([]byte) (int, error)
- type RwConn
- func (conn *RwConn) Close() error
- func (conn *RwConn) LocalAddr() net.Addr
- func (conn *RwConn) Read(p []byte) (int, error)
- func (conn *RwConn) RemoteAddr() net.Addr
- func (conn *RwConn) SetDeadline(t time.Time) error
- func (conn *RwConn) SetReadDeadline(t time.Time) error
- func (conn *RwConn) SetWriteDeadline(t time.Time) error
- func (conn *RwConn) Write(p []byte) (int, error)
- type SignalContext
- type SignalContextSlot
- type SingleConnListener
- type StoreContext
- type TextStreamLogger
Constants ¶
View Source
const (
ServerSign = "OpenNG"
)
Variables ¶
View Source
var Background = backgroundCtx{}
Functions ¶
func ByteCountSI ¶
func CheckPasswordHash ¶
func HashPassword ¶
func RandString ¶
func TrimLeftChar ¶
Types ¶
type BufferedLookup ¶
type BufferedLookup struct {
// contains filtered or unexported fields
}
func NewBufferedLookup ¶
func NewBufferedLookup(f LookupFunc) *BufferedLookup
func (*BufferedLookup) Lookup ¶
func (bl *BufferedLookup) Lookup(id string) (index interface{})
func (*BufferedLookup) Refresh ¶
func (bl *BufferedLookup) Refresh()
type ByteCounterConn ¶
type Context ¶
type Context interface {
Signal(interface{}, interface{}) error
Slot(interface{}) ContextSlot
Store(interface{}, interface{})
Load(interface{}) (interface{}, bool)
Close()
}
type ContextSlot ¶
type ContextSlot interface {
Wait() <-chan interface{}
Close()
}
type GroupRegexp ¶
func MustCompileRegexp ¶
func MustCompileRegexp(exps []string) GroupRegexp
func NewGroupRegexp ¶
func NewGroupRegexp(exps []string) (GroupRegexp, error)
func (GroupRegexp) MatchString ¶
func (r GroupRegexp) MatchString(k string) bool
func (GroupRegexp) String ¶
func (r GroupRegexp) String() (ret []string)
type HangContext ¶
type HangContext struct {
}
func (HangContext) Close ¶
func (HangContext) Close()
func (HangContext) Load ¶
func (HangContext) Load(k interface{}) (interface{}, bool)
func (HangContext) Signal ¶
func (ctx HangContext) Signal(key interface{}, val interface{}) error
func (HangContext) Slot ¶
func (ctx HangContext) Slot(interface{}) ContextSlot
func (HangContext) Store ¶
func (HangContext) Store(k interface{}, v interface{})
type LookupFunc ¶
type LookupFunc func(string) interface{}
type NilContext ¶
type NilContext struct {
}
func (NilContext) Close ¶
func (NilContext) Close()
func (NilContext) Load ¶
func (NilContext) Load(k interface{}) (interface{}, bool)
func (NilContext) Signal ¶
func (ctx NilContext) Signal(key interface{}, val interface{})
func (NilContext) Slot ¶
func (ctx NilContext) Slot(interface{}) ContextSlot
func (NilContext) Store ¶
func (NilContext) Store(k interface{}, v interface{})
type OneConn ¶
type OneConn struct {
// contains filtered or unexported fields
}
func (*OneConn) RemoteAddr ¶
type RoConn ¶
func (*RoConn) RemoteAddr ¶
type RwConn ¶
func (*RwConn) RemoteAddr ¶
type SignalContext ¶
type SignalContext struct {
// contains filtered or unexported fields
}
func (*SignalContext) Close ¶
func (ctx *SignalContext) Close()
func (*SignalContext) Signal ¶
func (ctx *SignalContext) Signal(key interface{}, val interface{}) error
func (*SignalContext) Slot ¶
func (ctx *SignalContext) Slot(key interface{}) ContextSlot
type SignalContextSlot ¶
type SignalContextSlot struct {
// contains filtered or unexported fields
}
func (*SignalContextSlot) Close ¶
func (slt *SignalContextSlot) Close()
func (*SignalContextSlot) Wait ¶
func (slt *SignalContextSlot) Wait() <-chan interface{}
type SingleConnListener ¶
type SingleConnListener struct {
// contains filtered or unexported fields
}
func ConnGetSocket ¶
func ConnGetSocket(c net.Conn) (l *SingleConnListener)
func (*SingleConnListener) Addr ¶
func (l *SingleConnListener) Addr() net.Addr
func (*SingleConnListener) Close ¶
func (l *SingleConnListener) Close() error
type StoreContext ¶
func (*StoreContext) Load ¶
func (ctx *StoreContext) Load(k interface{}) (interface{}, bool)
func (*StoreContext) NilLoad ¶
func (ctx *StoreContext) NilLoad(k interface{}) interface{}
func (*StoreContext) Store ¶
func (ctx *StoreContext) Store(k interface{}, v interface{})
type TextStreamLogger ¶
type TextStreamLogger struct {
// contains filtered or unexported fields
}
func NewTextStreamLogger ¶
func NewTextStreamLogger() (broker *TextStreamLogger)
func (*TextStreamLogger) ServeHTTP ¶
func (broker *TextStreamLogger) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.