Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultLeaseTtl = 30 * time.Minute
View Source
const DefaultWaitTimeout = 120 * time.Second
Variables ¶
View Source
var CommonFlags = flag.Set{ flag.Region(), flag.Image(), flag.Now(), flag.RemoteOnly(false), flag.LocalOnly(), flag.Push(), flag.Detach(), flag.Strategy(), flag.Dockerfile(), flag.Ignorefile(), flag.ImageLabel(), flag.BuildArg(), flag.BuildSecret(), flag.BuildTarget(), flag.NoCache(), flag.Nixpacks(), flag.BuildOnly(), flag.StringSlice{ Name: "env", Shorthand: "e", Description: "Set of environment variables in the form of NAME=VALUE pairs. Can be specified multiple times.", }, flag.Bool{ Name: "auto-confirm", Description: "Will automatically confirm changes when running non-interactively.", }, flag.Int{ Name: "wait-timeout", Description: "Seconds to wait for individual machines to transition states and become healthy.", Default: int(DefaultWaitTimeout.Seconds()), }, flag.Int{ Name: "lease-timeout", Description: "Seconds to lease individual machines while running deployment. All machines are leased at the beginning and released at the end, so this needs to be as long as the entire deployment. flyctl releases leases in most cases.", Default: int(DefaultLeaseTtl.Seconds()), }, }
Functions ¶
func DeployWithConfig ¶ added in v0.0.337
Types ¶
type LeasableMachine ¶
type LeasableMachine interface { Machine() *api.Machine HasLease() bool AcquireLease(context.Context, time.Duration) error ReleaseLease(context.Context) error Update(context.Context, api.LaunchMachineInput) error Start(context.Context) error Destroy(context.Context, bool) error WaitForState(context.Context, string, time.Duration) error WaitForHealthchecksToPass(context.Context, time.Duration) error WaitForEventTypeAfterType(context.Context, string, string, time.Duration) (*api.MachineEvent, error) FormattedMachineId() string }
func NewLeasableMachine ¶
type MachineDeployment ¶ added in v0.0.452
FIXME: move a lot of this stuff to internal/machine pkg... maybe all of it?
func NewMachineDeployment ¶ added in v0.0.452
func NewMachineDeployment(ctx context.Context, args MachineDeploymentArgs) (MachineDeployment, error)
type MachineDeploymentArgs ¶ added in v0.0.452
type MachineSet ¶
type MachineSet interface { AcquireLeases(context.Context, time.Duration) error ReleaseLeases(context.Context) error IsEmpty() bool GetMachines() []LeasableMachine }
func NewMachineSet ¶
Click to show internal directories.
Click to hide internal directories.