seq

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 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 Uploader

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

Uploader is a sequential uploader

func New

func New(s3Uploader upload.S3Uploader, dockerUploader upload.DockerUploader, status chan<- *upload.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 upload.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