inactivity

package
v2.0.0-...-691db5a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseClientConn

func CloseClientConn(cc ClientConn)

Types

type ClientConn

type ClientConn = interface {
	Context() context.Context
	Close() error
}

type KeepAlive

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

func NewKeepAlive

func NewKeepAlive(maxRetries uint32, onInactive OnInactiveFunc, sendPing func(cc ClientConn, receivePong func()) (func(), error)) *KeepAlive

func (*KeepAlive) OnInactive

func (m *KeepAlive) OnInactive(cc ClientConn)

type Monitor

type Monitor = interface {
	CheckInactivity(cc ClientConn)
	Notify()
}

func NewInactivityMonitor

func NewInactivityMonitor(duration time.Duration, onInactive OnInactiveFunc) Monitor

func NewNilMonitor

func NewNilMonitor() Monitor

type OnInactiveFunc

type OnInactiveFunc = func(cc ClientConn)

Jump to

Keyboard shortcuts

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