client

package module
v0.0.0-...-4a658a7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 10 Imported by: 0

README

client

AFAIRE


Copyright (c) 2022-2023 Archivage Numérique

Documentation

Index

Constants

View Source
const (
	ErrCreated  = errors.Sentinel("job created")
	ErrReserved = errors.Sentinel("job reserved")
	ErrUpdated  = errors.Sentinel("job updated")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(logger *logger.Logger, cfg *balancer.Config) (*Client, error)

func (*Client) CreateJob

func (cl *Client) CreateJob(ctx context.Context, jtc *sdk.JobToCreate) (*sdk.Job, error)

func (*Client) CreateWorkflow

func (cl *Client) CreateWorkflow(ctx context.Context, wtc *sdk.WorkflowToCreate) (*sdk.Workflow, *sdk.Job, error)

func (*Client) NextJob

func (cl *Client) NextJob(ctx context.Context, namespace, host, worker string) (*sdk.Job, error)

func (*Client) UpdateJob

func (cl *Client) UpdateJob(ctx context.Context, jtu *sdk.JobToUpdate) (*sdk.Job, *sdk.Job, error)

Jump to

Keyboard shortcuts

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