plan

package
v0.2.41 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlyPostgresPlan

type FlyPostgresPlan struct {
	AppName    string `json:"app_name"`
	VmSize     string `json:"vm_size"`
	VmRam      int    `json:"vm_ram"`
	Nodes      int    `json:"nodes"`
	DiskSizeGB int    `json:"disk_size_gb"`
	AutoStop   bool   `json:"auto_stop"`
}

func (*FlyPostgresPlan) Guest

func (p *FlyPostgresPlan) Guest() *fly.MachineGuest

type LaunchPlan

type LaunchPlan struct {
	AppName string `json:"name"`
	OrgSlug string `json:"org"`

	RegionCode       string `json:"region"`
	HighAvailability bool   `json:"ha"`

	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	CPUKind string `json:"vm_cpukind,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	CPUs int `json:"vm_cpus,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	MemoryMB int `json:"vm_memory,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	VmSize string `json:"vm_size,omitempty"`

	// In the future, we'll use this over CPUKind, CPUs, MemoryMB, and VmSize.
	// As of writing this, however, the UI does not return this field.
	Compute []*appconfig.Compute `json:"compute"`

	HttpServicePort             int  `json:"http_service_port,omitempty"`
	HttpServicePortSetByScanner bool `json:"http_service_port_set_by_scanner,omitempty"`

	Postgres PostgresPlan `json:"postgres"`
	Redis    RedisPlan    `json:"redis"`
	Sentry   bool         `json:"sentry"`

	ScannerFamily string          `json:"scanner_family"`
	FlyctlVersion version.Version `json:"flyctl_version"`
}

func (*LaunchPlan) Guest

func (p *LaunchPlan) Guest() *fly.MachineGuest

Guest returns the guest described by the *raw* guest fields in a Plan. When the UI starts returning Compute, this will be deprecated.

type PostgresPlan

type PostgresPlan struct {
	FlyPostgres      *FlyPostgresPlan      `json:"fly_postgres"`
	SupabasePostgres *SupabasePostgresPlan `json:"supabase_postgres"`
}

func DefaultPostgres

func DefaultPostgres(plan *LaunchPlan) PostgresPlan

func (*PostgresPlan) Provider

func (p *PostgresPlan) Provider() any

type RedisPlan

type RedisPlan struct {
	UpstashRedis *UpstashRedisPlan `json:"upstash_redis"`
}

func DefaultRedis

func DefaultRedis(plan *LaunchPlan) RedisPlan

func (*RedisPlan) Provider

func (p *RedisPlan) Provider() any

type SupabasePostgresPlan added in v0.2.24

type SupabasePostgresPlan struct {
	DbName string `json:"db_name"`
	Region string `json:"region"`
}

func (*SupabasePostgresPlan) GetDbName added in v0.2.24

func (p *SupabasePostgresPlan) GetDbName(plan *LaunchPlan) string

func (*SupabasePostgresPlan) GetRegion added in v0.2.24

func (p *SupabasePostgresPlan) GetRegion(plan *LaunchPlan) string

type UpstashRedisPlan

type UpstashRedisPlan struct {
	Eviction     bool     `json:"eviction"`
	ReadReplicas []string `json:"read_replicas"`
}

Jump to

Keyboard shortcuts

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