inactivity

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 3 Imported by: 5

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 added in v2.4.0

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

func NewKeepAlive added in v2.4.0

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

func (*KeepAlive) OnInactive added in v2.4.0

func (m *KeepAlive) OnInactive(cc ClientConn)

type Monitor

type Monitor = interface {
	CheckInactivity(now time.Time, cc ClientConn)
	Notify()
}

func NewInactivityMonitor

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

func NewNilMonitor added in v2.4.0

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