Documentation ¶
Index ¶
- Variables
- func NewContext(ctx context.Context, c *Client) context.Context
- type Client
- func (f *Client) AcquireLease(ctx context.Context, machineID string, ttl *int) (*api.MachineLease, error)
- func (f *Client) CreateApp(ctx context.Context, name string, org string) (err error)
- func (f *Client) Destroy(ctx context.Context, input api.RemoveMachineInput) (err error)
- func (f *Client) Exec(ctx context.Context, machineID string, in *api.MachineExecRequest) (*api.MachineExecResponse, error)
- func (f *Client) FindLease(ctx context.Context, machineID string) (*api.MachineLease, error)
- func (f *Client) Get(ctx context.Context, machineID string) (*api.Machine, error)
- func (f *Client) GetMany(ctx context.Context, machineIDs []string) ([]*api.Machine, error)
- func (f *Client) Kill(ctx context.Context, machineID string) (err error)
- func (f *Client) Launch(ctx context.Context, builder api.LaunchMachineInput) (*api.Machine, error)
- func (f *Client) List(ctx context.Context, state string) ([]*api.Machine, error)
- func (f *Client) ListActive(ctx context.Context) ([]*api.Machine, error)
- func (f *Client) ListFlyAppsMachines(ctx context.Context) ([]*api.Machine, *api.Machine, error)
- func (f *Client) NewRequest(ctx context.Context, method, path string, in interface{}, ...) (*http.Request, error)
- func (f *Client) RefreshLease(ctx context.Context, machineID string, ttl *int, nonce string) (*api.MachineLease, error)
- func (f *Client) ReleaseLease(ctx context.Context, machineID, nonce string) error
- func (f *Client) Restart(ctx context.Context, in api.RestartMachineInput) (err error)
- func (f *Client) Start(ctx context.Context, machineID string) (*api.MachineStartResponse, error)
- func (f *Client) Stop(ctx context.Context, in api.StopMachineInput) (err error)
- func (f *Client) Update(ctx context.Context, builder api.LaunchMachineInput, nonce string) (*api.Machine, error)
- func (f *Client) Wait(ctx context.Context, machine *api.Machine, state string, timeout time.Duration) (err error)
- type FlapsError
Constants ¶
This section is empty.
Variables ¶
View Source
var NonceHeader = "fly-machine-lease-nonce"
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func FromContext ¶ added in v0.0.349
FromContext returns the Client ctx carries. It panics in case ctx carries no Client.
func (*Client) AcquireLease ¶ added in v0.0.434
func (*Client) Exec ¶ added in v0.0.451
func (f *Client) Exec(ctx context.Context, machineID string, in *api.MachineExecRequest) (*api.MachineExecResponse, error)
func (*Client) ListActive ¶ added in v0.0.376
ListActive returns only non-destroyed that aren't in a reserved process group.
func (*Client) ListFlyAppsMachines ¶ added in v0.0.452
returns apps that are part of the fly apps platform that are not destroyed
func (*Client) NewRequest ¶
func (*Client) RefreshLease ¶ added in v0.0.466
func (*Client) ReleaseLease ¶
type FlapsError ¶ added in v0.0.459
type FlapsError struct { OriginalError error ResponseStatusCode int ResponseBody []byte FlyRequestId string }
func (*FlapsError) Error ¶ added in v0.0.459
func (fe *FlapsError) Error() string
func (*FlapsError) ResponseBodyString ¶ added in v0.0.459
func (fe *FlapsError) ResponseBodyString() string
func (*FlapsError) Unwrap ¶ added in v0.0.459
func (fe *FlapsError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.