Documentation ¶
Index ¶
- Variables
- func DeleteHatchery(db *sql.DB, id int64, workerModelID int64) error
- func Exists(db *sql.DB, id int64) error
- func Heartbeat()
- func InsertHatchery(db *sql.DB, h *sdk.Hatchery) error
- func LoadDeadHatcheries(db *sql.DB, timeout float64) ([]sdk.Hatchery, error)
- func LoadHatcheries(db *sql.DB) ([]sdk.Hatchery, error)
- func LoadHatchery(db *sql.DB, uid string) (*sdk.Hatchery, error)
- func LoadHatcheryByID(db *sql.DB, id int64) (*sdk.Hatchery, error)
- func RefreshHatchery(db *sql.DB, hatchID string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var HatcheryHeartbeatTimeout = 30.0
HatcheryHeartbeatTimeout defines the number of seconds allowed for hatcheries to refresh their beat
Functions ¶
func DeleteHatchery ¶
DeleteHatchery removes from database given hatchery and linked model
func Heartbeat ¶
func Heartbeat()
Heartbeat runs in a goroutine and check last beat from all hatcheries on a 10s basis
func InsertHatchery ¶
InsertHatchery registers in database new hatchery
func LoadDeadHatcheries ¶
LoadDeadHatcheries load hatchery with refresh last beat > timeout
func LoadHatcheries ¶
LoadHatcheries retrieves in database all registered hatcheries
func LoadHatchery ¶
LoadHatchery fetch hatchery info from database given UID
func LoadHatcheryByID ¶
LoadHatcheryByID fetch hatchery info from database given ID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.