Documentation
¶
Index ¶
- Variables
- func AddManagerSession(currentSession Session, r *http.Request)
- func Index() http.Handler
- func IsWebsocketUpgrade(r *http.Request) (result bool)
- func NewProxyHandler() http.Handler
- func ProxyBasicAuth(r *http.Request) (username, password string, ok bool)
- type ExpVarStruct
- type Record
- type Session
- type SessionManager
- func (sm *SessionManager) Add(k string, ssn Session) error
- func (sm *SessionManager) ApiSessionsHandler(w http.ResponseWriter, r *http.Request)
- func (sm *SessionManager) ConnectHandler(w http.ResponseWriter, r *http.Request)
- func (sm *SessionManager) DelSession(ssn Session)
- func (sm *SessionManager) Get(k string) (Session, bool)
- func (sm *SessionManager) IncrementVisit(k string)
- func (sm *SessionManager) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (sm *SessionManager) Lease(r *http.Request, ssn Session, candidates []string, clobber string) error
- func (sm *SessionManager) Ping(ssn Session)
- func (sm *SessionManager) Scan(ssn Session)
- func (sm *SessionManager) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSessionManager = &SessionManager{ HOST: "<unknown>", counter: 0, sessions: map[string]Session{}, ssnstamp: map[string]time.Time{}, ssn_cntr: map[string]int{}, slock: &sync.RWMutex{}, proxy: NewProxyHandler(), }
View Source
var PingInterval = 5 * time.Second
Functions ¶
func AddManagerSession ¶ added in v0.2.15
func IsWebsocketUpgrade ¶ added in v0.2.15
func NewProxyHandler ¶ added in v0.2.26
Types ¶
type ExpVarStruct ¶ added in v0.2.19
type ExpVarStruct struct { WebteleportRelayStreamsSpawned *expvar.Int WebteleportRelayStreamsClosed *expvar.Int WebteleportRelaySessionsAccepted *expvar.Int WebteleportRelaySessionsClosed *expvar.Int }
func NewExpVarStruct ¶ added in v0.2.19
func NewExpVarStruct() *ExpVarStruct
type Session ¶ added in v0.2.14
type Session interface { InitController(context.Context) error GetController() net.Conn GetValues() url.Values OpenConn(context.Context) (net.Conn, error) }
func UpgradeWebsocketSession ¶ added in v0.2.15
type SessionManager ¶
type SessionManager struct { HOST string // contains filtered or unexported fields }
func (*SessionManager) ApiSessionsHandler ¶
func (sm *SessionManager) ApiSessionsHandler(w http.ResponseWriter, r *http.Request)
func (*SessionManager) ConnectHandler ¶
func (sm *SessionManager) ConnectHandler(w http.ResponseWriter, r *http.Request)
func (*SessionManager) DelSession ¶
func (sm *SessionManager) DelSession(ssn Session)
func (*SessionManager) IncrementVisit ¶
func (sm *SessionManager) IncrementVisit(k string)
func (*SessionManager) IndexHandler ¶
func (sm *SessionManager) IndexHandler(w http.ResponseWriter, r *http.Request)
func (*SessionManager) Ping ¶
func (sm *SessionManager) Ping(ssn Session)
func (*SessionManager) Scan ¶
func (sm *SessionManager) Scan(ssn Session)
func (*SessionManager) ServeHTTP ¶
func (sm *SessionManager) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.