toputils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SortByCid      server.SortOpt = "cid"
	SortBySubs                    = "subs"
	SortByOutMsgs                 = "msgs_to"
	SortByInMsgs                  = "msgs_from"
	SortByOutBytes                = "bytes_to"
	SortByInBytes                 = "bytes_from"
)
View Source
const DisplaySubscriptions = 1

Variables

This section is empty.

Functions

func MonitorStats

func MonitorStats(
	opts map[string]interface{},
	statsCh chan *Stats,
	shutdownCh chan struct{},
) error

MonitorStats is ran as a goroutine and takes options which can modify how poll values then sends to channel.

func Psize

func Psize(s int64) string

Psize takes a float and returns a human readable string

func Request

func Request(path string, opts map[string]interface{}) (interface{}, error)

Request takes a path and options, and returns a Stats struct with with either connz or varz

Types

type ByBytesFrom

type ByBytesFrom []*server.ConnInfo

func (ByBytesFrom) Len

func (d ByBytesFrom) Len() int

func (ByBytesFrom) Less

func (d ByBytesFrom) Less(i, j int) bool

func (ByBytesFrom) Swap

func (d ByBytesFrom) Swap(i, j int)

type ByBytesTo

type ByBytesTo []*server.ConnInfo

func (ByBytesTo) Len

func (d ByBytesTo) Len() int

func (ByBytesTo) Less

func (d ByBytesTo) Less(i, j int) bool

func (ByBytesTo) Swap

func (d ByBytesTo) Swap(i, j int)

type ByCid

type ByCid []*server.ConnInfo

func (ByCid) Len

func (d ByCid) Len() int

func (ByCid) Less

func (d ByCid) Less(i, j int) bool

func (ByCid) Swap

func (d ByCid) Swap(i, j int)

type ByMsgsFrom

type ByMsgsFrom []*server.ConnInfo

func (ByMsgsFrom) Len

func (d ByMsgsFrom) Len() int

func (ByMsgsFrom) Less

func (d ByMsgsFrom) Less(i, j int) bool

func (ByMsgsFrom) Swap

func (d ByMsgsFrom) Swap(i, j int)

type ByMsgsTo

type ByMsgsTo []*server.ConnInfo

func (ByMsgsTo) Len

func (d ByMsgsTo) Len() int

func (ByMsgsTo) Less

func (d ByMsgsTo) Less(i, j int) bool

func (ByMsgsTo) Swap

func (d ByMsgsTo) Swap(i, j int)

type ByPending

type ByPending []*server.ConnInfo

func (ByPending) Len

func (d ByPending) Len() int

func (ByPending) Less

func (d ByPending) Less(i, j int) bool

func (ByPending) Swap

func (d ByPending) Swap(i, j int)

type BySubs

type BySubs []*server.ConnInfo

func (BySubs) Len

func (d BySubs) Len() int

func (BySubs) Less

func (d BySubs) Less(i, j int) bool

func (BySubs) Swap

func (d BySubs) Swap(i, j int)

type Rates

type Rates struct {
	InMsgsRate   float64
	OutMsgsRate  float64
	InBytesRate  float64
	OutBytesRate float64
}

type Stats

type Stats struct {
	Varz  *server.Varz
	Connz *server.Connz
	Rates *Rates
}

Jump to

Keyboard shortcuts

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