pipeline

package
v0.0.0-...-1b0f315 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func NewBuffer

func NewBuffer(reader io.Reader) *Buffer

func (*Buffer) Bytes

func (c *Buffer) Bytes() []byte

func (*Buffer) Len

func (c *Buffer) Len() int

func (*Buffer) ReadAll

func (c *Buffer) ReadAll() error

func (*Buffer) Reader

func (c *Buffer) Reader() io.Reader

type Pipeline

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

func NewPipeline

func NewPipeline(source *Source, sinker *Sinker, steps []PipelineStep) Pipeline

func (*Pipeline) Execute

func (p *Pipeline) Execute() (PipelineCtx, error)

type PipelineCtx

type PipelineCtx struct {
	Path             media.Path
	Buffer           *Buffer
	ContentType      media.ContentType
	EmbeddedMetadata media.Metadata
	Tags             []media.Tag
}

type PipelineStep

type PipelineStep interface {
	Execute(ctx PipelineCtx) (PipelineCtx, error)
}

type ReadFunc

type ReadFunc = func(ctx PipelineCtx) (PipelineCtx, error)

type SinkFunc

type SinkFunc = func(PipelineCtx) (PipelineCtx, error)

type Sinker

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

func NewSinker

func NewSinker(sink SinkFunc) Sinker

func (*Sinker) Execute

func (s *Sinker) Execute(ctx PipelineCtx) (PipelineCtx, error)

type Source

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

func NewSource

func NewSource(read ReadFunc) Source

func (*Source) Execute

func (s *Source) Execute(ctx PipelineCtx) (PipelineCtx, error)

Jump to

Keyboard shortcuts

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