Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGetRecipeFailed = errors.New("failed to get recipe") ErrSaveJobFailed = errors.New("failed to save job") )
A list of custom errors
Functions ¶
func ErrCreateInstanceFailed ¶
ErrCreateInstanceFailed builds the message for an error when creating an instance
Types ¶
type DatasetAPI ¶
type DatasetAPI interface { CreateInstance(ctx context.Context, job *models.Job, recipeInst *models.RecipeInstance) (instance *models.Instance, err error) UpdateInstanceState(ctx context.Context, instanceID string, newState string) error }
DatasetAPI interface to the dataset API.
type Queue ¶
type Queue interface {
Queue(ctx context.Context, job *models.ImportData) error
}
Queue interface used to queue import jobs.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides job related functionality.
func NewService ¶
func NewService(dataStore datastore.DataStorer, queue Queue, datasetAPI DatasetAPI, recipeAPI RecipeAPI, urlBuilder *url.Builder) *Service
NewService returns a new instance of a job.Service using the given dependencies.
Click to show internal directories.
Click to hide internal directories.