errors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package errors contains types and interfaces representing download errors. It is used in the processor to encapsulate information on errors being retriable and/or internal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func E

func E(phase string, err error) downloadError

E creates and returns a new downloadError with the given phase and err. The created downloadError is neither retriable nor internal.

func Errorf

func Errorf(phase string, pattern string, args ...interface{}) downloadError

Errorf is a convenience function that creates a new downloadError with given phase automatically formatting the given arguments to the downloadErrors err field.

Types

type DownloadError

type DownloadError interface {
	IsRetriable() bool
	IsInternal() bool
	Err() error
	Error() string
}

DownloadError is the interface that encapsulate the bahaviour that must be met by any download error.

Jump to

Keyboard shortcuts

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