Documentation ¶
Index ¶
- func AddCoordinatorNode(n node.Node) (status int)
- func AddStorageNode(n node.Node) (status int)
- func CheckDueMessageStatusStorage()
- func CheckMessageStatusStorage(id string)
- func CheckMessageStorage(id string) (status int, hasMessage bool)
- func ClearNodeTables() (status int)
- func Close()
- func GetCoordinatorNodes() (status int, storageNodes []node.Node)
- func GetRandomCoordinatorNodes(max int) (status int, nodes []node.Node)
- func GetStorageNodes(limit int) (status int, storageNodes []node.Node)
- func Init()
- func LogMessageStorage(id string) (status int)
- func UpdateMessageStatusStorage(messageID string, status int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCoordinatorNode ¶
AddCoordinatorNode adds a CoordinatorNode to the local database
func AddStorageNode ¶
AddStorageNode adds a StorageNode to the local database
func CheckDueMessageStatusStorage ¶
func CheckDueMessageStatusStorage()
CheckDueMessageStatusStorage checks the status of all messages checked more that settings.MessageMinCheckDelay ago, removes them if they exceed settings.MessageMaxStoreTime or have been received
func CheckMessageStatusStorage ¶
func CheckMessageStatusStorage(id string)
CheckMessageStatusStorage checks the status of a locally stored message against the Coordinator Network and handles it respectively
func CheckMessageStorage ¶
CheckMessageStorage checks whether a message is is present in the local database
func ClearNodeTables ¶
func ClearNodeTables() (status int)
ClearNodeTables removes all elements from storageNodes and coordinatorNodes tables, for bootstrapping
func GetCoordinatorNodes ¶
GetCoordinatorNodes returns known CoordinatorNodes
func GetRandomCoordinatorNodes ¶
GetRandomCoordinatorNodes returns max <number> random CoordinatorNodes
func GetStorageNodes ¶
GetStorageNodes returns known StorageNodes
func LogMessageStorage ¶
LogMessageStorage logs to the StorageNode Database that a message has been received and stored locally
func UpdateMessageStatusStorage ¶
UpdateMessageStatusStorage updates the status of a message in the local database
Types ¶
This section is empty.