state

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRelativeStateDirectory = ".score-flyio"
	FileName                      = "state.yaml"
	SharedStateAppPrefixKey       = "score-flyio-app-prefix"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdProvisioner

type CmdProvisioner struct {
	Binary string   `json:"binary"`
	Args   []string `json:"args"`
}

type HttpProvisioner

type HttpProvisioner struct {
	Url string `json:"url"`
}

type Provisioner

type Provisioner struct {
	ProvisionerId string                  `yaml:"id"`
	ResourceType  string                  `yaml:"resource_type"`
	ResourceClass string                  `yaml:"resource_class,omitempty"`
	ResourceId    string                  `yaml:"resource_id,omitempty"`
	Cmd           *CmdProvisioner         `yaml:"cmd,omitempty"`
	Http          *HttpProvisioner        `yaml:"http,omitempty"`
	Static        *map[string]interface{} `yaml:"static,omitempty"`
}

func (*Provisioner) Matches

func (p *Provisioner) Matches(uid framework.ResourceUid) bool

type ResourceExtras

type ResourceExtras struct{}

type StateDirectory

type StateDirectory struct {
	// The path to the state directory
	Path string
	// The current state file
	State State
}

The StateDirectory holds the local state of the project, including any configuration, extensions, plugins, or resource provisioning state when possible.

func LoadStateDirectory

func LoadStateDirectory(directory string) (*StateDirectory, bool, error)

LoadStateDirectory loads the state directory for the given directory (usually PWD).

func (*StateDirectory) Persist

func (sd *StateDirectory) Persist() error

Persist ensures that the directory is created and that the current config file has been written with the latest settings.

type StateExtras

type StateExtras struct {
	AppPrefix    string        `yaml:"app_prefix"`
	Provisioners []Provisioner `yaml:"provisioners"`
}

type WorkloadExtras

type WorkloadExtras struct{}

Jump to

Keyboard shortcuts

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