cancel

package
v0.0.0-...-a810e79 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelableDownload

func CancelableDownload(c *Canceler, client *http.Client, req *http.Request) (*http.Response, chan bool, error)

CancelableDownload performs an http request and allows for it to be canceled at any time

Types

type Canceler

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

Canceler tracks a cancelable operation

func NewCanceler

func NewCanceler() *Canceler

NewCanceler returns a new Canceler struct

func (*Canceler) Cancel

func (c *Canceler) Cancel() error

Cancel will attempt to cancel all ongoing operations

func (*Canceler) Cancelable

func (c *Canceler) Cancelable() bool

Cancelable indicates whether there are operations that support cancelation

Jump to

Keyboard shortcuts

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