entities

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApcHost

type ApcHost struct {
	IpAddress            string
	Name                 string
	NetworkSamplePeriod  time.Duration
	GraphingSamplePeriod time.Duration
	Enabled              bool
	TrayIcon             bool
	State                string
	Bloadpct             binding.String `json:"-"`
	Bbcharge             binding.String `json:"-"`
	Blinev               binding.String `json:"-"`
	Bcumonbatt           binding.String `json:"-"`
	Bxoffbatt            binding.String `json:"-"`
	Bxonbatt             binding.String `json:"-"`
	Bnumxfers            binding.String `json:"-"`
	Bmaster              binding.String `json:"-"`
	Bcable               binding.String `json:"-"`
}

func NewApcHost

func NewApcHost(name, ip string, networkSamplePeriod, graphingSamplePeriod time.Duration, enable, trayIcon bool) *ApcHost

func (*ApcHost) IsNil added in v0.9.3

func (a *ApcHost) IsNil() bool

type ChannelTuple

type ChannelTuple struct {
	Events chan []string
	Status chan []string
}

func NewChannelTuple

func NewChannelTuple(depth int) *ChannelTuple

func (*ChannelTuple) Close

func (ct *ChannelTuple) Close()

type GraphAverage added in v0.9.3

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

func NewGraphAverage added in v0.9.3

func NewGraphAverage(hostName, pointName string, graphPeriod time.Duration) *GraphAverage

NewGraphAverage create a data queue of graphPeriod depth returns the straight average of the queue,

func (*GraphAverage) AddValue added in v0.9.3

func (g *GraphAverage) AddValue(value float64) float64

AddValue adds the given float32 value into the queue and return the average value of the queue value queue's size is limited by graph period config value

func (*GraphAverage) IsNil added in v0.9.3

func (g *GraphAverage) IsNil() bool

func (*GraphAverage) SeriesName added in v0.9.3

func (g *GraphAverage) SeriesName() string

func (*GraphAverage) String added in v0.9.3

func (g *GraphAverage) String() string

type UpsStatusValueBindings added in v0.9.4

type UpsStatusValueBindings struct {
	Host       *ApcHost
	Bselftest  binding.String
	Bnumxfers  binding.String
	Blastxfer  binding.String
	Bxonbatt   binding.String
	Bxoffbatt  binding.String
	Btonbatt   binding.String
	Bcumonbatt binding.String
	Bhostname  binding.String
	Bupsname   binding.String
	Bmaster    binding.String
	Blinev     binding.String
	Bbattv     binding.String
	Bbcharge   binding.String
	Bloadpct   binding.String
	Btimeleft  binding.String
	Bversion   binding.String
	Bcable     binding.String
	Bdriver    binding.String
	Bupsmode   binding.String
	Bstarttime binding.String
	Bstatus    binding.String
	Bmodel     binding.String
	Bserialno  binding.String
	Bmandate   binding.String
	Bfirmware  binding.String
	Bbattdate  binding.String
	Bitemp     binding.String
}

UpsStatusValueBindings bond datapoints for UPS status display

func NewUpsStatusValueBindings added in v0.9.4

func NewUpsStatusValueBindings(h *ApcHost) *UpsStatusValueBindings

NewUpsStatusValueBindings creates a new collection of string to be bound to the view elements for UPS.

func (*UpsStatusValueBindings) Apply added in v0.9.4

func (b *UpsStatusValueBindings) Apply(params map[string]string)

Apply reads slices from provided channel and assigns value to bond strings

func (*UpsStatusValueBindings) IsNil added in v0.9.4

func (b *UpsStatusValueBindings) IsNil() bool

func (*UpsStatusValueBindings) UnbindUpsData added in v0.9.4

func (b *UpsStatusValueBindings) UnbindUpsData()

Jump to

Keyboard shortcuts

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