seq

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package seq implements a simple Sequential Uploader. Upload jobs are processed sequentially in-order.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debugf(format string, v ...interface{})
}

Logger defines the logger interface

type Uploader

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

Uploader is a sequential uploader

func New

func New(logger Logger, filecopyUploader, s3Uploader, dockerUploader upload.Uploader, status chan<- *scheduler.Result) *Uploader

New initializes a sequential uploader Status chan must have a buffer count > 1 otherwise a deadlock occurs

func (*Uploader) Add

func (u *Uploader) Add(job scheduler.Job)

Add adds a new upload job, can be called after Start()

func (*Uploader) Start

func (u *Uploader) Start()

Start starts uploading jobs in the queue. If the statusChan buffer is full, uploading will be blocked.

func (*Uploader) Stop

func (u *Uploader) Stop()

Stop stops the uploader

Jump to

Keyboard shortcuts

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