task

package
v0.0.0-...-de618e6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

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

func NewDownload

func NewDownload(config *DownloadConfig) *Download

func (Download) Add

func (m Download) Add(delta int, msg string)

func (Download) Progress

func (m Download) Progress(cb func(e *ProgressEvent))

func (*Download) Run

func (t *Download) Run(ctx context.Context) error

func (Download) SetExpected

func (m Download) SetExpected(n int)

type DownloadConfig

type DownloadConfig struct {
	StartDate       *time.Time
	EndDate         *time.Time
	FilterGameTypes []string
	FilterGameState []string
	Out             *os.File
	PartitionSize   int
}

type Monitored

type Monitored interface {
	Progress(func(*ProgressEvent))
}

type ProcessFeed

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

func NewProcessFeed

func NewProcessFeed(config *ProcessFeedConfig) *ProcessFeed

func (ProcessFeed) Add

func (m ProcessFeed) Add(delta int, msg string)

func (ProcessFeed) Progress

func (m ProcessFeed) Progress(cb func(e *ProgressEvent))

func (*ProcessFeed) Run

func (t *ProcessFeed) Run(ctx context.Context) error

func (ProcessFeed) SetExpected

func (m ProcessFeed) SetExpected(n int)

type ProcessFeedConfig

type ProcessFeedConfig struct {
	Source        string
	FilePattern   []string
	Pool          *pgxpool.Pool
	PartitionSize int
}

type ProgressEvent

type ProgressEvent struct {
	CompletedPct float64
	Message      string
}

type Task

type Task interface {
	Run(context.Context) error
}

type Upload

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

func NewUpload

func NewUpload(config *UploadConfig) *Upload

func (Upload) Add

func (m Upload) Add(delta int, msg string)

func (Upload) Progress

func (m Upload) Progress(cb func(e *ProgressEvent))

func (*Upload) Run

func (t *Upload) Run(ctx context.Context) error

func (Upload) SetExpected

func (m Upload) SetExpected(n int)

type UploadConfig

type UploadConfig struct {
	Source        string
	FilePattern   []string
	UploadType    string
	DSN           string
	PartitionSize int
}

Jump to

Keyboard shortcuts

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