Documentation ¶
Index ¶
- type Cluster
- type Database
- func (db *Database) AcceptJobs(request *pb.AcceptJobsRequest, cluster *Cluster) (*pb.AcceptJobsResponse, error)
- func (db *Database) GetCluster(name string) (*Cluster, error)
- func (db *Database) ReceiveJobs(request *pb.ReceiveJobsRequest, cluster *Cluster) (*pb.ReceiveJobsResponse, error)
- func (db *Database) RegisterCluster(name, globalToken string, nodesGraph graph.JsonGraph) (*pb.RegisterResponse, error)
- func (db *Database) SubmitJob(job *pb.SubmitJobRequest, cluster *Cluster) (*pb.SubmitJobResponse, error)
- func (db *Database) ValidateClusterSecret(name, secret string) (*Cluster, error)
- func (db *Database) ValidateClusterToken(name, token string) (*Cluster, error)
- type Job
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AcceptJobs ¶
func (db *Database) AcceptJobs( request *pb.AcceptJobsRequest, cluster *Cluster, ) (*pb.AcceptJobsResponse, error)
AcceptJobs We use this function after validating a cluster with a secret and simply retrieve the ids and delete them from the database if they exist
func (*Database) GetCluster ¶
GetCluster gets a cluster by name
func (*Database) ReceiveJobs ¶
func (db *Database) ReceiveJobs( request *pb.ReceiveJobsRequest, cluster *Cluster, ) (*pb.ReceiveJobsResponse, error)
Request MaxJobs for a cluster to receive
func (*Database) RegisterCluster ¶
func (db *Database) RegisterCluster( name, globalToken string, nodesGraph graph.JsonGraph, ) (*pb.RegisterResponse, error)
RegisterCluster registers a cluster or returns another status
func (*Database) SubmitJob ¶
func (db *Database) SubmitJob( job *pb.SubmitJobRequest, cluster *Cluster, ) (*pb.SubmitJobResponse, error)
SubmitJob adds the assigned job to the database
func (*Database) ValidateClusterSecret ¶
ValidateClusterSecret checks if a cluster secret is valid The secret is used for validating a request for jobs.
Click to show internal directories.
Click to hide internal directories.