flaps

package
v0.0.378 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NonceHeader = "fly-machine-lease-nonce"

Functions

func NewContext added in v0.0.349

func NewContext(ctx context.Context, c *Client) context.Context

NewContext derives a Context that carries c from ctx.

Types

type Client

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

func FromContext added in v0.0.349

func FromContext(ctx context.Context) *Client

FromContext returns the Client ctx carries. It panics in case ctx carries no Client.

func New

func New(ctx context.Context, app *api.AppCompact) (*Client, error)

func (*Client) CreateApp

func (f *Client) CreateApp(ctx context.Context, name string, org string) (err error)

func (*Client) Destroy

func (f *Client) Destroy(ctx context.Context, input api.RemoveMachineInput) (err error)

func (*Client) Get

func (f *Client) Get(ctx context.Context, machineID string) (*api.Machine, error)

func (*Client) GetLease

func (f *Client) GetLease(ctx context.Context, machineID string, ttl *int) (*api.MachineLease, error)

func (*Client) Kill

func (f *Client) Kill(ctx context.Context, machineID string) (err error)

func (*Client) Launch

func (f *Client) Launch(ctx context.Context, builder api.LaunchMachineInput) (*api.Machine, error)

func (*Client) List

func (f *Client) List(ctx context.Context, state string) ([]*api.Machine, error)

func (*Client) ListActive added in v0.0.376

func (f *Client) ListActive(ctx context.Context) ([]*api.Machine, error)

ListActive returns only non-destroyed that aren't in a reserved process group.

func (*Client) NewRequest

func (f *Client) NewRequest(ctx context.Context, method, path string, in interface{}, headers map[string][]string) (*http.Request, error)

func (*Client) ReleaseLease

func (f *Client) ReleaseLease(ctx context.Context, machineID, nonce string) error

func (*Client) Start

func (f *Client) Start(ctx context.Context, machineID string) (*api.MachineStartResponse, error)

func (*Client) Stop

func (f *Client) Stop(ctx context.Context, machine api.StopMachineInput) (err error)

func (*Client) Update

func (f *Client) Update(ctx context.Context, builder api.LaunchMachineInput, nonce string) (*api.Machine, error)

func (*Client) Wait

func (f *Client) Wait(ctx context.Context, machine *api.Machine, state string) (err error)

Jump to

Keyboard shortcuts

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