manager

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSessionManager = &SessionManager{
	HOST:     "<unknown>",
	counter:  0,
	sessions: map[string]*session.Session{},
	ssnstamp: map[string]time.Time{},
	ssn_cntr: map[string]int{},
	slock:    &sync.RWMutex{},
}
View Source
var PingInterval = 5 * time.Second
View Source
var WebteleportConnsRelayClosed = expvar.NewInt("webteleport_conns_relay_closed")
View Source
var WebteleportConnsRelaySpawned = expvar.NewInt("webteleport_conns_relay_spawned")

Functions

func NotFoundHealth

func NotFoundHealth(w http.ResponseWriter, r *http.Request)

Types

type Record

type Record struct {
	Host      string    `json:"host"`
	CreatedAt time.Time `json:"created_at"`
	Tags      tags.Tags `json:"tags"`
	Visited   int       `json:"visited"`
}

type SessionManager

type SessionManager struct {
	HOST string
	// contains filtered or unexported fields
}

func (*SessionManager) Add

func (sm *SessionManager) Add(k string, ssn *session.Session) error

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) Del

func (sm *SessionManager) Del(k string) error

func (*SessionManager) DelSession

func (sm *SessionManager) DelSession(ssn *session.Session)

func (*SessionManager) Get

func (sm *SessionManager) Get(k string) (*session.Session, bool)

func (*SessionManager) IncrementVisit

func (sm *SessionManager) IncrementVisit(k string)

func (*SessionManager) IndexHandler

func (sm *SessionManager) IndexHandler(w http.ResponseWriter, r *http.Request)

func (*SessionManager) Lease

func (sm *SessionManager) Lease(ssn *session.Session, candidates []string, clobber string) error

func (*SessionManager) Ping

func (sm *SessionManager) Ping(ssn *session.Session)

func (*SessionManager) Scan

func (sm *SessionManager) Scan(ssn *session.Session)

func (*SessionManager) ServeHTTP

func (sm *SessionManager) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL