function

package module
v0.0.0-...-359ec18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalResponse

func MarshalResponse(results JobResults) (*events.APIGatewayV2HTTPResponse, error)

func ProcessJob

func ProcessJob(_ context.Context, body string) (string, error)

ProcessJob processes a single job.

Types

type JobIDs

type JobIDs []*pb.Job

func (JobIDs) LogValue

func (jobs JobIDs) LogValue() slog.Value

LogValue implements slog.LogValuer.

type JobResults

type JobResults []*pb.JobResult

func ProcessJobs

func ProcessJobs(ctx context.Context, jobs Jobs) (JobResults, error)

ProcessJobs processes a batch of jobs.

This function is called by the lambda function.

The function returns a list of results, each result corresponds to a job in the input list. If the job was processed successfully, the result will contain the result of the job. If the job failed, the result will contain an error message.

type Jobs

type Jobs []*pb.Job

func UnmarshalBody

func UnmarshalBody(request *events.APIGatewayV2HTTPRequest) (Jobs, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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