processing

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

func New

func New(concurrency int, storage *storage.Store, repo store.AssetRepo, logger *slog.Logger) *Pipeline

func (*Pipeline) Enqueue

func (p *Pipeline) Enqueue(ctx context.Context, asset *store.Asset)

func (*Pipeline) GeneratePreviewPDF added in v0.2.0

func (p *Pipeline) GeneratePreviewPDF(ctx context.Context, asset *store.Asset) (io.ReadCloser, error)

GeneratePreviewPDF returns a PDF rendering of an office document, converting it with LibreOffice headless on first use and caching the result under the preview key. It returns store.ErrNotFound when the document type is not previewable or when soffice is not installed, so the API layer answers 404 and clients fall back to downloading the original file.

func (*Pipeline) GenerateThumbnail

func (p *Pipeline) GenerateThumbnail(ctx context.Context, asset *store.Asset, w, h int, format string) (io.ReadCloser, string, error)

func (*Pipeline) ObserveProcessing

func (p *Pipeline) ObserveProcessing(fn func(time.Duration))

func (*Pipeline) Process

func (p *Pipeline) Process(ctx context.Context, asset *store.Asset) error

func (*Pipeline) Wait

func (p *Pipeline) Wait()

Jump to

Keyboard shortcuts

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