Documentation ¶
Index ¶
- func IDGenerator(_ context.Context, job *models.Job) error
- type ChainedTransformer
- type GenericTransformer
- type JobDefaults
- type JobFn
- type JobTransformer
- func DefaultPublisher(publisherConfig *models.SpecConfig) JobTransformer
- func DefaultsApplier(defaults JobDefaults) JobTransformer
- func NameOptional() JobTransformer
- func NewInlineStoragePinner(provider storage.StorageProvider) JobTransformer
- func RequesterInfo(requesterNodeID string) JobTransformer
- type ResultFn
- type ResultTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainedTransformer ¶ added in v1.1.4
type ChainedTransformer[T any] []GenericTransformer[T]
ChainedTransformer is a slice of Transformers that runs in sequence
type GenericTransformer ¶ added in v1.1.4
GenericTransformer is an interface that can be used to modify an object in place.
type JobDefaults ¶ added in v1.1.0
type JobTransformer ¶ added in v1.1.1
type JobTransformer interface { GenericTransformer[*models.Job] }
JobTransformer is an interface that can be used to modify a job in place, such as setting default values or migrating.
func DefaultPublisher ¶ added in v1.2.2
func DefaultPublisher(publisherConfig *models.SpecConfig) JobTransformer
func DefaultsApplier ¶ added in v1.1.0
func DefaultsApplier(defaults JobDefaults) JobTransformer
DefaultsApplier is a transformer that applies default values to the job.
func NameOptional ¶ added in v1.1.1
func NameOptional() JobTransformer
NameOptional is a transformer that sets the job name to the job ID if it is empty.
func NewInlineStoragePinner ¶ added in v1.2.0
func NewInlineStoragePinner(provider storage.StorageProvider) JobTransformer
NewInlineStoragePinner returns a job transformer that limits the inline space taken up by inline data. It will scan a job for StorageSpec objects that store their data inline and move any that are too large into IPFS storage. It also limits the total size taken up by inline specs and if this value is exceeded it will move the largest specs into IPFS.
func RequesterInfo ¶ added in v1.1.0
func RequesterInfo(requesterNodeID string) JobTransformer
RequesterInfo is a transformer that sets the requester ID in the job meta.
type ResultFn ¶ added in v1.1.4
type ResultFn func(context.Context, *models.SpecConfig) error
ResultFn is a function that implements ResultTransformer transform interface.
type ResultTransformer ¶ added in v1.1.4
type ResultTransformer interface { GenericTransformer[*models.SpecConfig] }
ResultTransformer is an interface that can be used to modify a result in place.