Documentation ¶
Index ¶
- Constants
- func AddInitServers(initServersArr []string)
- func DeclarePollFailed(machine *types.Machine)
- func DeclarePollSucceeded(machine *types.Machine, ping float64)
- func MachineAdd(machine *types.Machine, declareAlive bool) error
- func MachineGet(ip string) (*types.Machine, error)
- func MachineRemove(ip string) error
- func MachineRemoveAll() error
- func MachineUpdate(machine *types.Machine) (int64, error)
- func MachinesGet() ([]types.Machine, error)
- func MachinesGetAlive() ([]types.Machine, error)
- func MachinesGetAliveAndSuspected() ([]types.Machine, error)
- func Start()
- type Error
Constants ¶
View Source
const DatabaseName = "discovery.db"
View Source
const DatabasePath = "db"
Variables ¶
This section is empty.
Functions ¶
func AddInitServers ¶
func AddInitServers(initServersArr []string)
func DeclarePollFailed ¶
DeclarePollFailed declares the machine as dead when the threshold of dead polls is reached
func DeclarePollSucceeded ¶
DeclarePollSucceeded declare the machine as alive and reset the dead polls counter
func MachineAdd ¶
MachineAdd tries to add the machine to database, if already present if declareAlive is true then the machine will be redeclared as alive/home/gabrielepmattia/Coding/p2p-faas/stack-discovery
func MachineRemove ¶
func MachineRemoveAll ¶
func MachineRemoveAll() error
func MachinesGet ¶
func MachinesGetAlive ¶
MachinesGetAlive retrieves machines that surely are alive
Types ¶
Click to show internal directories.
Click to hide internal directories.