batch

package
v0.41.6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "batch"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [3]string{"submit", "status", "hints"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeNotAvailable

func MakeNotAvailable(err error) *goa.ServiceError

MakeNotAvailable builds a goa.ServiceError from an error.

func MakeNotValid

func MakeNotValid(err error) *goa.ServiceError

MakeNotValid builds a goa.ServiceError from an error.

func NewHintsEndpoint added in v0.35.0

func NewHintsEndpoint(s Service) goa.Endpoint

NewHintsEndpoint returns an endpoint function that calls the method "hints" of service "batch".

func NewStatusEndpoint

func NewStatusEndpoint(s Service) goa.Endpoint

NewStatusEndpoint returns an endpoint function that calls the method "status" of service "batch".

func NewSubmitEndpoint

func NewSubmitEndpoint(s Service) goa.Endpoint

NewSubmitEndpoint returns an endpoint function that calls the method "submit" of service "batch".

Types

type BatchHintsResult added in v0.35.0

type BatchHintsResult struct {
	// A list of known values of completedDir used by existing watchers.
	CompletedDirs []string
}

BatchHintsResult is the result type of the batch service hints method.

type BatchResult

type BatchResult struct {
	WorkflowID string
	RunID      string
}

BatchResult is the result type of the batch service submit method.

type BatchStatusResult

type BatchStatusResult struct {
	Running    bool
	Status     *string
	WorkflowID *string
	RunID      *string
}

BatchStatusResult is the result type of the batch service status method.

type Client

type Client struct {
	SubmitEndpoint goa.Endpoint
	StatusEndpoint goa.Endpoint
	HintsEndpoint  goa.Endpoint
}

Client is the "batch" service client.

func NewClient

func NewClient(submit, status, hints goa.Endpoint) *Client

NewClient initializes a "batch" service client given the endpoints.

func (*Client) Hints added in v0.35.0

func (c *Client) Hints(ctx context.Context) (res *BatchHintsResult, err error)

Hints calls the "hints" endpoint of the "batch" service.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (res *BatchStatusResult, err error)

Status calls the "status" endpoint of the "batch" service.

func (*Client) Submit

func (c *Client) Submit(ctx context.Context, p *SubmitPayload) (res *BatchResult, err error)

Submit calls the "submit" endpoint of the "batch" service. Submit may return the following errors:

  • "not_available" (type *goa.ServiceError)
  • "not_valid" (type *goa.ServiceError)
  • error: internal error

type Endpoints

type Endpoints struct {
	Submit goa.Endpoint
	Status goa.Endpoint
	Hints  goa.Endpoint
}

Endpoints wraps the "batch" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "batch" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "batch" service endpoints.

type Service

type Service interface {
	// Submit a new batch
	Submit(context.Context, *SubmitPayload) (res *BatchResult, err error)
	// Retrieve status of current batch operation.
	Status(context.Context) (res *BatchStatusResult, err error)
	// Retrieve form hints
	Hints(context.Context) (res *BatchHintsResult, err error)
}

The batch service manages batches of collections.

type SubmitPayload

type SubmitPayload struct {
	Path                string
	Pipeline            *string
	ProcessingConfig    *string
	CompletedDir        *string
	RetentionPeriod     *string
	RejectDuplicates    bool
	ExcludeHiddenFiles  bool
	TransferType        *string
	ProcessNameMetadata bool
	Depth               int
}

SubmitPayload is the payload type of the batch service submit method.

Jump to

Keyboard shortcuts

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