Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // spool is immutable, consumed tasks remains in spool. IsImmutable = withMutability(immutable) // spool is mutable, consumed tasks are removed IsMutable = withMutability(mutable) // spool fails on error WithStrict = withStrict(strict) // spool skips error, continue as warning WithSkipError = withStrict(skiperror) )
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem interface {
fs.FS
Create(path string, attr *struct{}) (File, error)
Remove(path string) error
}
A FileSystem provides access to a hierarchical file system. The abstraction support I/O to local file system or AWS S3. Use it with https://github.com/fogfish/stream
type Spool ¶
type Spool struct {
// contains filtered or unexported fields
}
func (*Spool) ForEach ¶
func (spool *Spool) ForEach( ctx context.Context, dir string, f func(context.Context, string, io.Reader) (io.ReadCloser, error), ) error
Apply the spool function over each file in the reader filesystem, producing results to writer file system.
func (*Spool) ForEachFile ¶
func (spool *Spool) ForEachFile( ctx context.Context, dir string, f func(context.Context, string, []byte) ([]byte, error), ) error
Apply the spool function over each file in the reader filesystem, producing results to writer file system. It is a variant of [ForEach] that used bytes slices.
Click to show internal directories.
Click to hide internal directories.