Documentation
¶
Index ¶
- type RemoteGain
- func (g *RemoteGain) ExportJSON() ([]byte, error)
- func (g *RemoteGain) GetAggregatedTotal() int64
- func (g *RemoteGain) GetMachineBreakdown() map[string]int64
- func (g *RemoteGain) ListMachines() []*RemoteMachine
- func (g *RemoteGain) RecordLocal(savedTokens int64)
- func (g *RemoteGain) RecordLocalDaily(date string, savedTokens int64)
- func (g *RemoteGain) RegisterMachine(machine *RemoteMachine)
- func (g *RemoteGain) Reset()
- func (g *RemoteGain) UpdateRemote(machineID string, total int64)
- type RemoteMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RemoteGain ¶
type RemoteGain struct {
LocalTotal int64 `json:"local_total"`
LocalDaily map[string]int64 `json:"local_daily"`
RemoteTotals map[string]int64 `json:"remote_totals"`
// contains filtered or unexported fields
}
func NewRemoteGain ¶
func NewRemoteGain() *RemoteGain
func (*RemoteGain) ExportJSON ¶
func (g *RemoteGain) ExportJSON() ([]byte, error)
func (*RemoteGain) GetAggregatedTotal ¶
func (g *RemoteGain) GetAggregatedTotal() int64
func (*RemoteGain) GetMachineBreakdown ¶
func (g *RemoteGain) GetMachineBreakdown() map[string]int64
func (*RemoteGain) ListMachines ¶
func (g *RemoteGain) ListMachines() []*RemoteMachine
func (*RemoteGain) RecordLocal ¶
func (g *RemoteGain) RecordLocal(savedTokens int64)
func (*RemoteGain) RecordLocalDaily ¶
func (g *RemoteGain) RecordLocalDaily(date string, savedTokens int64)
func (*RemoteGain) RegisterMachine ¶
func (g *RemoteGain) RegisterMachine(machine *RemoteMachine)
func (*RemoteGain) Reset ¶
func (g *RemoteGain) Reset()
func (*RemoteGain) UpdateRemote ¶
func (g *RemoteGain) UpdateRemote(machineID string, total int64)
type RemoteMachine ¶
Click to show internal directories.
Click to hide internal directories.