plan

package
v0.1.98 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 8 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) Describe

func (p *FlyPostgresPlan) Describe(ctx context.Context) (string, error)

func (*FlyPostgresPlan) Guest

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

type LaunchPlan

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

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

	CPUKind  string `json:"vm_cpukind,omitempty"`
	CPUs     int    `json:"vm_cpus,omitempty"`
	MemoryMB int    `json:"vm_memory,omitempty"`
	VmSize   string `json:"vm_size,omitempty"`

	HttpServicePort int `json:"http_service_port,omitempty"`

	Postgres PostgresPlan `json:"postgres"`

	Redis RedisPlan `json:"redis"`

	ScannerFamily string `json:"scanner_family"`
}

func (*LaunchPlan) Guest

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

func (*LaunchPlan) SetGuestFields

func (p *LaunchPlan) SetGuestFields(guest *api.MachineGuest)

type PostgresPlan

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

func DefaultPostgres

func DefaultPostgres(plan *LaunchPlan) PostgresPlan

func (*PostgresPlan) Describe

func (p *PostgresPlan) Describe(ctx context.Context) (string, error)

func (*PostgresPlan) Provider

func (p *PostgresPlan) Provider() PostgresProvider

type PostgresProvider

type PostgresProvider interface {
	Describe(ctx context.Context) (string, error)
}

type RedisPlan

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

func DefaultRedis

func DefaultRedis(plan *LaunchPlan) RedisPlan

func (*RedisPlan) Describe

func (p *RedisPlan) Describe(ctx context.Context) (string, error)

func (*RedisPlan) Provider

func (p *RedisPlan) Provider() RedisProvider

type RedisProvider

type RedisProvider interface {
	Describe(ctx context.Context) (string, error)
}

type UpstashRedisPlan

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

func (*UpstashRedisPlan) Describe

func (p *UpstashRedisPlan) Describe(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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