enqueuer

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFailedToEnqueueMessages = "batchapi.failed_to_enqueue_messages"
	ErrMessageExceedsMaxSize   = "batchapi.message_exceeds_max_size"
)

Variables

This section is empty.

Functions

func ErrorFailedToEnqueueMessages

func ErrorFailedToEnqueueMessages(message string) error

func ErrorMessageExceedsMaxSize

func ErrorMessageExceedsMaxSize(messageSize int, messageLimit int) error

Types

type DelimitedFiles

type DelimitedFiles struct {
	S3Lister
	BatchSize int `json:"batch_size"`
}

type Enqueuer

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

func NewEnqueuer

func NewEnqueuer(envConfig EnvConfig, queueURL string, logger *zap.Logger) (*Enqueuer, error)

func (*Enqueuer) Enqueue

func (e *Enqueuer) Enqueue() (int, error)

func (*Enqueuer) UploadBatchCount

func (e *Enqueuer) UploadBatchCount(batchCount int) error

type EnvConfig

type EnvConfig struct {
	ClusterUID string
	Region     string
	Version    string
	Bucket     string
	APIName    string
	JobID      string
}

type FilePathLister

type FilePathLister struct {
	S3Lister
	BatchSize int `json:"batch_size"`
}

type ItemList

type ItemList struct {
	Items     []json.RawMessage `json:"items"`
	BatchSize int               `json:"batch_size"`
}

type JobSubmission

type JobSubmission struct {
	ItemList       *ItemList       `json:"item_list"`
	FilePathLister *FilePathLister `json:"file_path_lister"`
	DelimitedFiles *DelimitedFiles `json:"delimited_files"`
}

type S3Lister

type S3Lister struct {
	S3Paths    []string `json:"s3_paths"` // s3://<bucket_name>/key
	Includes   []string `json:"includes"`
	Excludes   []string `json:"excludes"`
	MaxResults *int64   `json:"-"` // this is not currently exposed to the user (it's used for validations)
}

Jump to

Keyboard shortcuts

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