download

package
v2.234.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an download service client which can be used to make requests to the server. It extends the generic healthcheck Client structure.

func NewAPIClient

func NewAPIClient(downloadServiceAPIURL, serviceAuthToken string) *Client

NewAPIClient creates a new instance of DownloadServiceAPI Client with a given download service url

func NewWithHealthClient

func NewWithHealthClient(hcCli *healthcheck.Client, serviceAuthToken string) *Client

NewWithHealthClient creates a new instance of DownloadServiceAPI Client, reusing the URL and Clienter from the provided healthcheck client.

func (*Client) Checker

func (c *Client) Checker(ctx context.Context, check *health.CheckState) error

Checker calls download service health endpoint and returns a check object to the caller.

func (*Client) Download

func (c *Client) Download(ctx context.Context, path string) (*Response, error)

Download returns the requested path

type Response

type Response struct {
	Content io.ReadCloser
}

Jump to

Keyboard shortcuts

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