component

package
v0.0.0-...-fc135a5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvtScannerNewJob = "scanner.new-job"
	EvtScannerDone   = "scanner.done"
	EvtScannerError  = "scanner.error"
)
View Source
const (
	EvtTransferDone    = "transfer.done"
	EvtTransferJobDone = "transfer.job-done"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Src           string
	Dest          string
	Recursively   bool
	ConvertMatch  PathMatcher
	CopyMatch     PathMatcher
	ArchiveMatch  PathMatcher
	CopyFileMeta  bool
	CopyImageMeta bool
	CheckImage    bool
	MaxGo         int
	LogPath       string
	Opts          *webp.EncodeOptions
	JobQueue      chan *Job
}

type Job

type Job struct {
	In       iox.Input
	Out      iox.Output
	Codec    coder.Codec
	CopyMeta bool
	Err      error
	Warnings []error
}

type Monitor

type Monitor struct {
	Convert  counter
	Copy     counter
	Errs     int
	Warnings int
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(eb *eventbus.Bus, config *Config, logOut io.Writer) *Monitor

func (*Monitor) Start

func (mo *Monitor) Start(ctx context.Context)

type PathMatcher

type PathMatcher func(pathname string, depPlatform bool) bool

func NewGlobMatcher

func NewGlobMatcher(pattern string) (PathMatcher, error)

type PathScanner

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

func NewPathScanner

func NewPathScanner(eb *eventbus.Bus, config *Config) *PathScanner

config.Src and config.Dest must be cleaned by filepath.Clean first

func (*PathScanner) Scan

func (sc *PathScanner) Scan(ctx context.Context)

type Transfer

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

func NewTransfer

func NewTransfer(eb *eventbus.Bus, config *Config) *Transfer

func (*Transfer) Start

func (tr *Transfer) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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