Documentation ¶
Index ¶
- Constants
- func InitSatellites(orm *gorm.DB) error
- func Module(ball *mud.Ball)
- type CheckResult
- type DBLog
- func (d *DBLog) Error(ctx context.Context, s string, i ...interface{})
- func (d *DBLog) Info(ctx context.Context, s string, i ...interface{})
- func (d *DBLog) LogMode(level logger.LogLevel) logger.Interface
- func (d *DBLog) Trace(ctx context.Context, begin time.Time, ...)
- func (d *DBLog) Warn(ctx context.Context, s string, i ...interface{})
- type HealthStatus
- type HealthyReport
- type Measurement
- type Node
- type NodeID
- type NodeStat
- type Persistence
- func (n *Persistence) Get(id NodeID) (Node, error)
- func (n *Persistence) GetStat(ctx context.Context, nodeID NodeID, key string) (stat Stat, err error)
- func (n *Persistence) GetStatus(id NodeID) (map[string]Status, error)
- func (n *Persistence) GetUsedSatellites(id NodeID) ([]SatelliteUsage, error)
- func (n *Persistence) GetWallet(walletAddress common.Address) (Wallet, error)
- func (n *Persistence) GetWalletWithNodes(walletAddress common.Address) (Wallet, []Node, error)
- func (n *Persistence) Init() error
- func (n *Persistence) LatestStat(ctx context.Context, nodeID NodeID) (stat StatCollection, err error)
- func (n *Persistence) ListNodes() ([]Node, error)
- func (n *Persistence) ListNodesInternal() ([]Node, error)
- func (n *Persistence) RefreshViews(ctx context.Context)
- func (n *Persistence) SatelliteList() ([]UsedSatellite, error)
- func (n *Persistence) SaveWallet(w Wallet) error
- func (n *Persistence) UpdateCheckin(node Node) error
- func (n *Persistence) UpdateSatellites(node Node, statuses []HealthStatus) error
- func (n *Persistence) UpdateStatus(id NodeID, checked map[string]CheckResult) error
- type Refresher
- type Satellite
- type SatelliteUsage
- type Stat
- type StatCollection
- type StatRecord
- type Status
- type Subscription
- type Subscriptions
- func (s *Subscriptions) GetTargets(subscriptionType int, id string) (subs []Subscription, err error)
- func (s *Subscriptions) ListSubscriptions(destType int, dest string) (subs []Subscription, err error)
- func (s *Subscriptions) Subscribe(subscription Subscription) error
- func (s *Subscriptions) Unsubscribe(subscription Subscription) error
- type Telemetry
- type UsedSatellite
- type Wallet
Constants ¶
View Source
const ( NodeSubcription int = 0 WalletSubscription int = 1 TelegramSubscription int = 0 NtfySubscription int = 1 )
Variables ¶
This section is empty.
Functions ¶
func InitSatellites ¶
Types ¶
type CheckResult ¶
type HealthStatus ¶
type HealthyReport ¶
type HealthyReport struct { AllHealthy bool Statuses []HealthStatus }
type Measurement ¶
type NodeID ¶
func (*NodeID) GormDataType ¶
type NodeStat ¶
type NodeStat struct { Enabled bool UsedSpace StatRecord UploadedBytes StatRecord DownloadedBytes StatRecord }
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
func NewPersistence ¶
func NewPersistence(db *gorm.DB) *Persistence
func (*Persistence) GetStatus ¶
func (n *Persistence) GetStatus(id NodeID) (map[string]Status, error)
func (*Persistence) GetUsedSatellites ¶
func (n *Persistence) GetUsedSatellites(id NodeID) ([]SatelliteUsage, error)
func (*Persistence) GetWallet ¶
func (n *Persistence) GetWallet(walletAddress common.Address) (Wallet, error)
func (*Persistence) GetWalletWithNodes ¶
func (*Persistence) Init ¶
func (n *Persistence) Init() error
func (*Persistence) LatestStat ¶
func (n *Persistence) LatestStat(ctx context.Context, nodeID NodeID) (stat StatCollection, err error)
func (*Persistence) ListNodes ¶
func (n *Persistence) ListNodes() ([]Node, error)
func (*Persistence) ListNodesInternal ¶
func (n *Persistence) ListNodesInternal() ([]Node, error)
func (*Persistence) RefreshViews ¶
func (n *Persistence) RefreshViews(ctx context.Context)
func (*Persistence) SatelliteList ¶
func (n *Persistence) SatelliteList() ([]UsedSatellite, error)
func (*Persistence) SaveWallet ¶
func (n *Persistence) SaveWallet(w Wallet) error
func (*Persistence) UpdateCheckin ¶
func (n *Persistence) UpdateCheckin(node Node) error
func (*Persistence) UpdateSatellites ¶
func (n *Persistence) UpdateSatellites(node Node, statuses []HealthStatus) error
func (*Persistence) UpdateStatus ¶
func (n *Persistence) UpdateStatus(id NodeID, checked map[string]CheckResult) error
type Refresher ¶
type Refresher struct {
// contains filtered or unexported fields
}
func NewRefresher ¶
func NewRefresher(db *Persistence) *Refresher
type SatelliteUsage ¶
type Stat ¶
type Stat struct { Name string NodeID NodeID Values []Measurement }
type StatCollection ¶
type StatCollection struct {
Records []StatRecord
}
func (*StatCollection) AsNodeStat ¶
func (c *StatCollection) AsNodeStat() NodeStat
func (*StatCollection) Get ¶
func (c *StatCollection) Get(key string, field string) StatRecord
func (*StatCollection) Insert ¶
func (c *StatCollection) Insert(record StatRecord)
type StatRecord ¶
type Subscription ¶
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
func NewSubscriptions ¶
func NewSubscriptions(db *gorm.DB) *Subscriptions
func (*Subscriptions) GetTargets ¶
func (s *Subscriptions) GetTargets(subscriptionType int, id string) (subs []Subscription, err error)
func (*Subscriptions) ListSubscriptions ¶
func (s *Subscriptions) ListSubscriptions(destType int, dest string) (subs []Subscription, err error)
func (*Subscriptions) Subscribe ¶
func (s *Subscriptions) Subscribe(subscription Subscription) error
func (*Subscriptions) Unsubscribe ¶
func (s *Subscriptions) Unsubscribe(subscription Subscription) error
type UsedSatellite ¶
Click to show internal directories.
Click to hide internal directories.