Version: v0.0.0-...-c5df4de Latest Latest

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

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0




This section is empty.


This section is empty.


func AddRoutes

func AddRoutes(mux *goji.Mux, data *AdminData)

func Assets

func Assets() http.HandlerFunc

func ForTemplate

func ForTemplate(page string, adminData *AdminData) http.HandlerFunc

func Redirect

func Redirect() http.HandlerFunc


type AdminData

type AdminData struct {
	Version           string
	Config            config.Config
	ConnectionsActive int32
	ConnectionsTotal  int32
	Connections       map[string]ConnData
	// contains filtered or unexported fields

func NewAdminData

func NewAdminData() *AdminData

func (*AdminData) ConnectionClosed

func (a *AdminData) ConnectionClosed(id, alias string, d time.Duration)

func (*AdminData) ConnectionClosedDownstream

func (*AdminData) ConnectionClosedDownstream(id, alias string)

func (*AdminData) ConnectionClosedUpstream

func (*AdminData) ConnectionClosedUpstream(id, alias string)

func (*AdminData) ConnectionCompleted

func (a *AdminData) ConnectionCompleted(id, alias, direction string, transferredBytes int, duration time.Duration)

func (*AdminData) ConnectionDelayed

func (a *AdminData) ConnectionDelayed(id, alias string, direction string, delay time.Duration)

func (*AdminData) ConnectionOpened

func (a *AdminData) ConnectionOpened(id, alias, typ string)

func (*AdminData) ConnectionProgressed

func (a *AdminData) ConnectionProgressed(id, alias string, direction string, transferredBytes int)

func (*AdminData) ConnectionScheduledClose

func (a *AdminData) ConnectionScheduledClose(id, alias string, delay time.Duration)

func (*AdminData) RLock

func (a *AdminData) RLock()

func (*AdminData) RUnlock

func (a *AdminData) RUnlock()

type ConnData

type ConnData struct {
	Name                string
	Alias               string
	Type                string
	BytesSentUpstream   int
	BytesSentDownstream int
	Started             *time.Time
	Finished            *time.Time

func (ConnData) Since

func (c ConnData) Since() string

func (ConnData) Until

func (c ConnData) Until() string
type MenuItem struct {
	Name    string
	Label   string
	Enabled bool

type Ui

type Ui struct {
	Menu []MenuItem

Source Files

Jump to

Keyboard shortcuts

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