offchain

package
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL