Documentation ¶
Overview ¶
Package app implements functionality related to reading and writing app configuration files.
Index ¶
- Constants
- func NameFromContext(ctx context.Context) string
- func WithConfig(ctx context.Context, cfg *Config) context.Context
- func WithName(ctx context.Context, name string) context.Context
- type Build
- type Config
- func (c *Config) DockerBuildTarget() string
- func (c *Config) Dockerfile() string
- func (c *Config) EncodeTo(w io.Writer) error
- func (c *Config) GetEnvVariables() map[string]string
- func (ac *Config) HasBuilder() bool
- func (ac *Config) HasBuiltin() bool
- func (c *Config) HasDefinition() bool
- func (c *Config) HasServices() bool
- func (ac *Config) Image() string
- func (c *Config) InternalPort() (int, error)
- func (c *Config) SetDockerCommand(cmd string)
- func (c *Config) SetDockerEntrypoint(entrypoint string)
- func (c *Config) SetEnvVariable(name, value string)
- func (c *Config) SetEnvVariables(vals map[string]string)
- func (c *Config) SetInternalPort(port int) bool
- func (c *Config) SetKillSignal(signal string)
- func (c *Config) SetProcess(name, value string)
- func (c *Config) SetReleaseCommand(cmd string)
- func (c *Config) SetStatics(statics []sourcecode.Static)
- func (c *Config) SetVolumes(volumes []sourcecode.Volume)
- func (c *Config) Validate() (err error)
- func (c *Config) WriteToDisk() (err error)
- func (c *Config) WriteToFile(filename string) (err error)
- type HttpService
Constants ¶
View Source
const ( // DefaultConfigFileName denotes the default application configuration file name. DefaultConfigFileName = "fly.toml" // Config is versioned, initially, to separate nomad from machine apps without having to consult // the API NomadVersion = 1 MachinesVersion = 2 )
Variables ¶
This section is empty.
Functions ¶
func NameFromContext ¶
NameFromContext returns the app name ctx carries or an empty string.
func WithConfig ¶
WithConfig derives a context that carries cfg from ctx.
Types ¶
type Config ¶
type Config struct { AppName string `toml:"app,omitempty"` Build *Build `toml:"build,omitempty"` Version int `toml:"version,omitempty"` Count int `toml:"count,omitempty"` PrimaryRegion string `toml:"primary_region,omitempty"` HttpService *HttpService `toml:"http_service,omitempty"` Definition map[string]interface{} `toml:"definition,omitempty"` Path string `toml:"path,omitempty"` }
Config wraps the properties of app configuration.
func ConfigFromContext ¶
ConfigFromContext returns the Config ctx carries.
func LoadConfig ¶
LoadConfig loads the app config at the given path.
func (*Config) DockerBuildTarget ¶
func (*Config) Dockerfile ¶
func (*Config) GetEnvVariables ¶ added in v0.0.335
func (*Config) HasBuilder ¶
func (*Config) HasBuiltin ¶
func (*Config) HasDefinition ¶
func (*Config) HasServices ¶
HasServices - Does this config have a services section
func (*Config) InternalPort ¶
func (*Config) SetDockerCommand ¶
func (*Config) SetDockerEntrypoint ¶
func (*Config) SetEnvVariable ¶
func (*Config) SetEnvVariables ¶
func (*Config) SetInternalPort ¶
func (*Config) SetKillSignal ¶
func (*Config) SetProcess ¶
func (*Config) SetReleaseCommand ¶
func (*Config) SetStatics ¶
func (c *Config) SetStatics(statics []sourcecode.Static)
func (*Config) SetVolumes ¶
func (c *Config) SetVolumes(volumes []sourcecode.Volume)
func (*Config) WriteToDisk ¶ added in v0.0.335
func (*Config) WriteToFile ¶
type HttpService ¶ added in v0.0.337
Click to show internal directories.
Click to hide internal directories.