Documentation ¶
Index ¶
- type DB
- func (db *DB) Add(input Node) (err error)
- func (db *DB) Get(id string) (result Node, err error)
- func (db *DB) GetAllOlderThan(input time.Duration) (result []Node, err error)
- func (db *DB) GetNodesOnline() (nodes int, err error)
- func (db *DB) GetPoolSize() (total float64, used float64, err error)
- func (db *DB) Remove(id string) (err error)
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Get ¶
Get searches for and returns a the corresponding entry from the database if the entry exists.
func (*DB) GetAllOlderThan ¶ added in v0.0.3
GetAllOld returns all of the old node entries in the database in a channel.
func (*DB) GetNodesOnline ¶
GetNodesOnline calculates the number of nodes reporting to the database.
func (*DB) GetPoolSize ¶
GetPoolSize return the sum the nodes total space and used space.
Click to show internal directories.
Click to hide internal directories.