utils

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONFormat   = "JSON"
	InfluxFormat = "INFLUX"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Status   string         `json:"status"`
	Response StatusResponse `json:"response"`
}

func LoadStatusJSON

func LoadStatusJSON(data string) (*Command, error)

type Count

type Count struct {
	Total    int `json:"total"`
	Active   int `json:"active"`
	Peak     int `json:"peak"`
	Peak5min int `json:"peak5Min"`
	Limit    int `json:"limit"`
}

type Fetcher

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

func NewFetcher

func NewFetcher(host string, port int, pass string) (*Fetcher, error)

func (*Fetcher) Close

func (f *Fetcher) Close()

func (*Fetcher) FormatOutput

func (f *Fetcher) FormatOutput(format string) (string, string)

func (*Fetcher) GetData

func (f *Fetcher) GetData() error

type Profile

type Profile struct {
	Name  string `xml:"name"`
	Type  string `xml:"type"`
	Data  string `xml:"data"`
	State string `xml:"state"`
}

type Profiles

type Profiles struct {
	Profiles []*Profile `xml:"profile"`
}

type Rate

type Rate struct {
	Current  int `json:"current"`
	Max      int `json:"max"`
	Peak     int `json:"peak"`
	Peak5min int `json:"peak5Min"`
}

type Sessions

type Sessions struct {
	Count Count `json:"count"`
	Rate  Rate  `json:"rate"`
}

type SofiaProfile

type SofiaProfile struct {
	Name    string
	Address string
	Running string
}

func ParseSofiaStatus

func ParseSofiaStatus(data string) ([]*SofiaProfile, error)

type StackSize

type StackSize struct {
	Current int `json:"current"`
	Max     int `json:"max"`
}

type StatusResponse

type StatusResponse struct {
	Sessions  Sessions  `json:"sessions"`
	StackSize StackSize `json:"stackSizeKB"`
}

Jump to

Keyboard shortcuts

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