inputreader

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWatcherReader added in v0.1.9

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

FileWatcherReader is an abstraction of a folder watcher and behaves like a reader

func NewFileWatcherReader added in v0.1.9

func NewFileWatcherReader(f string, j bool, daily bool, logger *log.Logger) (*FileWatcherReader, error)

NewFileWatcherReader creates a new FileWatcherReader json specifies whether we now we handle json files

func (*FileWatcherReader) Read added in v0.1.9

func (fw *FileWatcherReader) Read(p []byte) (n int, err error)

Read waits for InCloseWrite file event uses a bytes reader to copy the resulting file encoded in b64 in p

func (*FileWatcherReader) Teardown added in v0.1.9

func (rl *FileWatcherReader) Teardown()

Teardown is called on error to stop the Reading loop if needed

type RedisLPOPReader

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

RedisLPOPReader is a abstraction of LPOP list and behaves like a reader

func NewLPOPReader

func NewLPOPReader(rc *redis.Conn, db int, queue string) (*RedisLPOPReader, error)

NewLPOPReader creates a new RedisLPOPReader

func (*RedisLPOPReader) Read

func (rl *RedisLPOPReader) Read(p []byte) (n int, err error)

Read LPOP the redis queue and use a bytes reader to copy the resulting data in p

func (*RedisLPOPReader) Teardown

func (rl *RedisLPOPReader) Teardown()

Teardown is called on error to close the redis connection

Jump to

Keyboard shortcuts

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