const DatabaseName = "p2pfaas-discovery.db"
const DatabasePath = "db"
func AddInitServers(initServersArr []string)
func DeclarePollFailed(machine *types.Machine)
DeclarePollFailed declares the machine as dead when the threshold of dead polls is reached
func DeclarePollSucceeded(machine *types.Machine, ping float64)
DeclarePollSucceeded declare the machine as alive and reset the dead polls counter
func MachineAdd(machine *types.Machine, declareAlive bool) error
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 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)
MachinesGetAlive retrieves machines that surely are alive
func MachinesGetAliveAndSuspected() ([]types.Machine, error)
func Start()
type Error struct { Reason string }
func (e Error) Error() string