Back to

Package cancel

Latest Go to latest

The highest tagged major version is .

Published: today | License: Apache-2.0 | Module:


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

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier