connection

package
v0.0.0-...-a67b36e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEndTimeNotSet = fmt.Errorf("connection end time is not yet set - duration cannot be calculated")
)

Functions

This section is empty.

Types

type Conn

type Conn struct {
	PushChan chan<- map[string]interface{}
	// contains filtered or unexported fields
}

func New

func New(wsConn *websocket.Conn, pushC chan<- map[string]interface{}, leave chan<- string, cookie string) *Conn

func (Conn) Duration

func (c Conn) Duration() (time.Duration, error)

Duration returns the session duration if the endTime is not the default value

func (*Conn) Finish

func (c *Conn) Finish() *Conn

func (Conn) Listen

func (c Conn) Listen()

Jump to

Keyboard shortcuts

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