stats

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	UploadBytes   int64 `json:"uploadBytes"`
	DownloadBytes int64 `json:"downloadBytes"`

	// Process list including current process and its parents.
	Processes []string `json:"processes"`

	Network      string    `json:"network"`
	LocalAddr    string    `json:"localAddr"`
	RemoteAddr   string    `json:"remoteAddr"`
	SessionStart time.Time `json:"sessionStart"`
	SessionEnd   time.Time `json:"sessionEnd"`
	Extra        string    `json:"extra"`
	OutboundTag  string    `json:"outboundTag"`

	FirstChunkReceived bool      `json:"-"`
	FirstChunkReceive  time.Time `json:"-"`
	FirstChunkDuration string    `json:"firstChunkDuration"`
}

func (*Session) AddDownloadBytes

func (s *Session) AddDownloadBytes(n int64)

func (*Session) AddUploadBytes

func (s *Session) AddUploadBytes(n int64)

type SessionStater

type SessionStater interface {
	Start() error
	Stop() error
	AddSession(key interface{}, session *Session)
	GetSession(key interface{}) *Session
	RemoveSession(key interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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