package
0.0.0-20250331114127-736dde6625db
Repository: https://github.com/sdslabs/gasper.git
Documentation: pkg.go.dev

# Functions

BulkRegisterApps registers multiple apps at once.
BulkRegisterDatabases registers multiple databases at once.
DecrementServiceLoad decrements the number of apps deployed on a service host by 1.
FetchAllApps returns all applications along with their URLs (IP of the node and port).
FetchAllDatabases gets all the apps with their URL (IP of the node and port).
FetchAppNode returns the URL of the node where the application is deployed.
FetchAppServer returns the URL of deployed application.
FetchDbNode returns the URL of the node where the database is deployed.
FetchDbServer returns the URL of the database's server.
FetchServiceInstances returns all instances of a given service.
FetchWorkerInstances returns all worker service instances.
GetLeastLoadedInstance returns a single instance having least number of apps of a particular service deployed.
GetLeastLoadedInstances returns the URL of the host currently having the least number of apps of a particular service deployed.
GetLeastLoadedInstancesWithScores returns the n least loaded instances along with their scores.
GetLeastLoadedWorker returns a single worker instance having least number of apps deployed.
GetSSHPort returns the port of an instance where its ssh service is deployed.
IncrementServiceLoad increments the number of apps deployed on a service host by 1.
RegisterApp registers the app in the applications HashMap with its server and node url.
RegisterDB registers the database in the databases HashMap with its server and node url.
RegisterService puts a service URL in its respective sorted set.
RemoveApp removes the application's entry from Redis.
RemoveDB removes the databases's entry from Redis.
RemoveServiceInstance removes an instance of a particular service.

# Constants

ApplicationKey is the key name for the HashMap containing application instances.
DatabaseKey is the key name for the HashMap containing database instances.
ErrEmptySet is the error message when the redis set being queried is empty.
SSHKey is the key name for the Sorted Set containing ssh microservice instances.
WorkerInstanceKey is the key name for Worker nodes.