Documentation ¶
Index ¶
- func LocalizePassages(passages []server.Passage) (psgs []Passage, manager *Passage)
- func New(valueCtx context.Context, dialer proxy.Dialer) (server.Server, error)
- func NewJohn(valueCtx context.Context, dialer proxy.Dialer, sweetLisaHost config.Lisa, ...) (server.Server, error)
- func NewJohnTCP(valueCtx context.Context, dialer proxy.Dialer, sweetLisaHost config.Lisa, ...) (server.Server, error)
- func NewJohnTlsGrpc(valueCtx context.Context, dialer proxy.Dialer, sweetLisaHost config.Lisa, ...) (server.Server, error)
- type Passage
- type Server
- func (s *Server) AddPassages(passages []server.Passage) (err error)
- func (s *Server) Close() error
- func (s *Server) ContentionCheck(thisIP net.IP, passage *Passage) (err error)
- func (s *Server) GetUserContextOrInsert(userIP string) *UserContext
- func (s *Server) Listen(addr string) (err error)
- func (s *Server) Passages() (passages []server.Passage)
- func (s *Server) RemovePassages(passages []server.Passage, alsoManager bool) (err error)
- func (s *Server) SyncPassages(passages []server.Passage) (err error)
- type UserContext
- type UserContextPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalizePassages ¶
func NewJohnTCP ¶ added in v1.2.0
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ContentionCheck ¶
func (*Server) GetUserContextOrInsert ¶ added in v1.1.5
func (s *Server) GetUserContextOrInsert(userIP string) *UserContext
func (*Server) RemovePassages ¶
type UserContext ¶ added in v1.1.5
UserContext is the context of a user which indicates the preferred servers
func NewUserContext ¶ added in v1.1.5
func NewUserContext(passages []Passage) *UserContext
func (*UserContext) Close ¶ added in v1.1.5
func (ctx *UserContext) Close() error
func (*UserContext) Infra ¶ added in v1.1.5
func (ctx *UserContext) Infra() *lrulist.LruList
type UserContextPool ¶ added in v1.1.5
UserContextPool is a pool which saves the UserContext and eliminates unused UserContext over time
func (*UserContextPool) Infra ¶ added in v1.1.5
func (pool *UserContextPool) Infra() *lru.LRU
Click to show internal directories.
Click to hide internal directories.