Documentation ¶
Index ¶
- func AcquireAllLeases(ctx context.Context) ([]*api.Machine, releaseLeasesFunc, error)
- func AcquireLease(ctx context.Context, machine *api.Machine) (*api.Machine, releaseLeaseFunc, error)
- func AcquireLeases(ctx context.Context, machines []*api.Machine) ([]*api.Machine, releaseLeasesFunc, error)
- func CloneConfig(orig *api.MachineConfig) *api.MachineConfig
- func ConfirmConfigChanges(ctx context.Context, machine *api.Machine, targetConfig api.MachineConfig, ...) (bool, error)
- func LaunchEphemeral(ctx context.Context, input *EphemeralInput) (*api.Machine, func(), error)
- func ListActive(ctx context.Context) ([]*api.Machine, error)
- func MergeFiles(machineConf *api.MachineConfig, files []*api.File)
- func NewMachineSet(flapsClient *flaps.Client, io *iostreams.IOStreams, machines []*api.Machine) *machineSet
- func Restart(ctx context.Context, m *api.Machine, input *api.RestartMachineInput, ...) error
- func RollingRestart(ctx context.Context, input *api.RestartMachineInput) error
- func Update(ctx context.Context, m *api.Machine, input *api.LaunchMachineInput) error
- func WaitForStartOrStop(ctx context.Context, machine *api.Machine, action string, ...) error
- type EphemeralInput
- type ErrNoConfigChangesFound
- type InvalidConfigErr
- type LeasableMachine
- type MachineSet
- type WaitTimeoutErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireAllLeases ¶ added in v0.0.434
AcquireAllLeases works to acquire/attach a lease for each active machine.
func AcquireLease ¶
func AcquireLease(ctx context.Context, machine *api.Machine) (*api.Machine, releaseLeaseFunc, error)
AcquireLease works to acquire/attach a lease for the specified machine. WARNING: Make sure you defer the lease release process.
func AcquireLeases ¶
func AcquireLeases(ctx context.Context, machines []*api.Machine) ([]*api.Machine, releaseLeasesFunc, error)
AcquireLeases works to acquire/attach a lease for each machine specified.
func CloneConfig ¶ added in v0.0.434
func CloneConfig(orig *api.MachineConfig) *api.MachineConfig
CloneConfig deep-copies a MachineConfig. If CloneConfig is called on a nil config, nil is returned.
func ConfirmConfigChanges ¶ added in v0.0.434
func LaunchEphemeral ¶ added in v0.1.73
func MergeFiles ¶ added in v0.1.64
func MergeFiles(machineConf *api.MachineConfig, files []*api.File)
MergeFiles merges the files parsed from the command line or fly.toml into the machine configuration.
func NewMachineSet ¶ added in v0.0.452
func RollingRestart ¶
func RollingRestart(ctx context.Context, input *api.RestartMachineInput) error
Types ¶
type EphemeralInput ¶ added in v0.1.73
type EphemeralInput struct { LaunchInput api.LaunchMachineInput What string }
type ErrNoConfigChangesFound ¶ added in v0.0.434
type ErrNoConfigChangesFound struct{}
func (*ErrNoConfigChangesFound) Error ¶ added in v0.0.434
func (e *ErrNoConfigChangesFound) Error() string
type InvalidConfigErr ¶ added in v0.1.79
type InvalidConfigErr struct { Reason invalidConfigReason // contains filtered or unexported fields }
func (InvalidConfigErr) Description ¶ added in v0.1.79
func (e InvalidConfigErr) Description() string
func (InvalidConfigErr) DocURL ¶ added in v0.1.79
func (e InvalidConfigErr) DocURL() string
func (InvalidConfigErr) Error ¶ added in v0.1.79
func (e InvalidConfigErr) Error() string
func (InvalidConfigErr) Suggestion ¶ added in v0.1.79
func (e InvalidConfigErr) Suggestion() string
type LeasableMachine ¶ added in v0.0.452
type LeasableMachine interface { Machine() *api.Machine HasLease() bool AcquireLease(context.Context, time.Duration) error RefreshLease(context.Context, time.Duration) error ReleaseLease(context.Context) error StartBackgroundLeaseRefresh(context.Context, time.Duration, time.Duration) Update(context.Context, api.LaunchMachineInput) error Start(context.Context) error Destroy(context.Context, bool) error WaitForState(context.Context, string, time.Duration, string, bool) error WaitForSmokeChecksToPass(context.Context, string) error WaitForHealthchecksToPass(context.Context, time.Duration, string) error WaitForEventTypeAfterType(context.Context, string, string, time.Duration, bool) (*api.MachineEvent, error) FormattedMachineId() string GetMinIntervalAndMinGracePeriod() (time.Duration, time.Duration) }
func NewLeasableMachine ¶ added in v0.0.452
type MachineSet ¶ added in v0.0.452
type MachineSet interface { AcquireLeases(context.Context, time.Duration) error ReleaseLeases(context.Context) error RemoveMachines(ctx context.Context, machines []LeasableMachine) error StartBackgroundLeaseRefresh(context.Context, time.Duration, time.Duration) IsEmpty() bool GetMachines() []LeasableMachine }
type WaitTimeoutErr ¶ added in v0.1.82
type WaitTimeoutErr struct {
// contains filtered or unexported fields
}
func (WaitTimeoutErr) Description ¶ added in v0.1.82
func (e WaitTimeoutErr) Description() string
func (WaitTimeoutErr) Error ¶ added in v0.1.82
func (e WaitTimeoutErr) Error() string
Click to show internal directories.
Click to hide internal directories.