session

package
v0.0.0-...-7429660 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) Delete

func (sm *Manager) Delete(id int64)

func (*Manager) Get

func (sm *Manager) Get(id int64) *Session

func (*Manager) Run

func (sm *Manager) Run(ctx context.Context, wc ikio.WriteCloser, cb func(ctx context.Context, s *Session)) bool

func (*Manager) Set

func (sm *Manager) Set(id int64, s *Session)

func (*Manager) Size

func (sm *Manager) Size() int64

type Session

type Session struct {
	ConnID int64
	// contains filtered or unexported fields
}

func NewSession

func NewSession(c *ikio.ServerChannel) *Session

func (*Session) Conn

func (s *Session) Conn() *ikio.ServerChannel

func (*Session) Info

func (s *Session) Info() interface{}

func (*Session) LastHeartbeat

func (s *Session) LastHeartbeat() int64

func (*Session) SetInfo

func (s *Session) SetInfo(info interface{})

func (*Session) UpdateInfo

func (s *Session) UpdateInfo(cb func(info interface{}))

func (*Session) UpdateLastHeartbeat

func (s *Session) UpdateLastHeartbeat(t int64)

Jump to

Keyboard shortcuts

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