Documentation
¶
Index ¶
- func ProposeJob(ctx context.Context, req ProposeJobRequest) error
- func ProposeJobs(ctx context.Context, lggr logger.Logger, oc cldf_offchain.Client, ...) error
- func ProposeWithJobDetails(ctx context.Context, lggr logger.Logger, oc cldf_offchain.Client, ...) error
- func RegisterNode(ctx context.Context, jd cldf_offchain.Client, name string, csaKey string, ...) (string, error)
- type ProposeJobRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProposeJob ¶
func ProposeJob(ctx context.Context, req ProposeJobRequest) error
ProposeJob proposes a job to a node using JD
func ProposeJobs ¶
func ProposeJobs(ctx context.Context, lggr logger.Logger, oc cldf_offchain.Client, jobSpecFilePath string) error
ProposeJobs proposes job specs to nodes using jobspecs file TODO remove when all migrations use Jobs instead of JobSpecs
func ProposeWithJobDetails ¶
func ProposeWithJobDetails(ctx context.Context, lggr logger.Logger, oc cldf_offchain.Client, jobsPath string) error
ProposeWithJobDetails proposes job specs to nodes using jobspecs file
func RegisterNode ¶
func RegisterNode( ctx context.Context, jd cldf_offchain.Client, name string, csaKey string, isBootstrap bool, domain domain.Domain, environment string, extraLabels map[string]string, ) (string, error)
RegisterNode registers a single node with the job distributor. It errors if the node is already registered.
Types ¶
type ProposeJobRequest ¶
type ProposeJobRequest struct {
Job string // toml
Domain domain.Domain
Environment string
// labels to filter nodes by
NodeLabels map[string]string
// labels to set on the new/updated job object
JobLabels map[string]string
OffchainClient cldf_offchain.Client
Lggr logger.Logger
}
ProposeJobRequest is the request to propose a job to a node using JD
func (ProposeJobRequest) Validate ¶
func (r ProposeJobRequest) Validate() error
Validate validates the request
Click to show internal directories.
Click to hide internal directories.