remotegain

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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

type RemoteMachine struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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