client

package
v0.0.0-...-90deddd Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package client implements a remote client for the reflow bootstrap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rest.Client
	// contains filtered or unexported fields
}

Client implements an http Client. Client serves two purposes: 1. To get the status of the bootstrap. 2. To push an image to bootstrap.

func New

func New(baseurl string, client *http.Client, log *log.Logger) (*Client, error)

New creates a new Client which connects to a given host using the provided http.Client. If http.Client is nil, the default client is used. If logger is not nil, Client logs detailed request/response information to it.

func (*Client) InstallImage

func (c *Client) InstallImage(ctx context.Context, image common.Image) error

InstallImage instructs the bootstrap instance to install and run a new image.

func (*Client) Status

func (c *Client) Status(ctx context.Context) error

Status gets the status from the servlet.

Jump to

Keyboard shortcuts

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