conwatch

package
v0.0.0-...-1564716 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionWatcher

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

func (*ConnectionWatcher) Add

func (cw *ConnectionWatcher) Add(c int64)

Add adds c to the number of active connections.

func (*ConnectionWatcher) Count

func (cw *ConnectionWatcher) Count() int

Count returns the number of connections at the time the call.

func (*ConnectionWatcher) OnStateChange

func (cw *ConnectionWatcher) OnStateChange(conn net.Conn, state http.ConnState)

OnStateChange records open connections in response to connection state changes. Set net/http Server.ConnState to this method as value.

Jump to

Keyboard shortcuts

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