Documentation ¶
Index ¶
- Variables
- func CommandReport(appName string, format string, infoFlag string) error
- func CommandSet(appName string, property string, value string) error
- func GetAppjsonDirectory(appName string) string
- func GetAppjsonPath(appName string) string
- func ReportSingleApp(appName string, format string, infoFlag string) error
- func TriggerAppJSONGetContent(appName string) error
- func TriggerAppJSONProcessDeployParallelism(appName string, processType string) error
- func TriggerCorePostDeploy(appName string) error
- func TriggerCorePostExtract(appName string, sourceWorkDir string) error
- func TriggerInstall() error
- func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error
- func TriggerPostAppRename(oldAppName string, newAppName string) error
- func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error
- func TriggerPostCreate(appName string) error
- func TriggerPostDelete(appName string) error
- func TriggerPostDeploy(appName string, imageTag string) error
- func TriggerPostReleaseBuilder(builderType string, appName string, image string) error
- func TriggerPreReleaseBuilder(builderType string, appName string, image string) error
- type AppJSON
- type CronCommand
- type Formation
- type FormationAutoscaling
- type FormationAutoscalingTrigger
- type HTTPHeader
- type Healthcheck
- type HealthcheckType
- type OnFailure
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultProperties is a map of all valid app-json properties with corresponding default property values DefaultProperties = map[string]string{ "appjson-path": "", } // GlobalProperties is a map of all valid global app-json properties GlobalProperties = map[string]bool{ "appjson-path": true, } )
Functions ¶
func CommandReport ¶
CommandReport displays a network report for one or more apps
func CommandSet ¶
CommandSet set or clear a builder property for an app
func GetAppjsonDirectory ¶
GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
func GetAppjsonPath ¶
GetAppjsonPath returns the path to a given app's extracted app.json file for use by other plugins
func ReportSingleApp ¶
ReportSingleApp is an internal function that displays the builder report for one or more apps
func TriggerAppJSONGetContent ¶
TriggerAppJSONGetContent outputs the contents of the app-json file, if any
func TriggerAppJSONProcessDeployParallelism ¶
TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
func TriggerCorePostDeploy ¶
TriggerCorePostDeploy sets a property to allow the app to be restored on boot
func TriggerCorePostExtract ¶
TriggerCorePostExtract ensures that the main app.json is the one specified by app-json-path
func TriggerInstall ¶
func TriggerInstall() error
TriggerInstall initializes app-json directory structures
func TriggerPostAppCloneSetup ¶
TriggerPostAppCloneSetup creates new app-json files
func TriggerPostAppRename ¶
TriggerPostAppRename removes the old app data
func TriggerPostAppRenameSetup ¶
TriggerPostAppRenameSetup renames app-json files
func TriggerPostCreate ¶
TriggerPostCreate ensures apps have the correct data directory structure
func TriggerPostDelete ¶
TriggerPostDelete destroys the app-json data for a given app container
func TriggerPostDeploy ¶
TriggerPostDeploy is a trigger to execute the postdeploy deployment task
func TriggerPostReleaseBuilder ¶
TriggerPostReleaseBuilder is a trigger to execute predeploy and release deployment tasks
Types ¶
type AppJSON ¶
type AppJSON struct { // Cron is a list of cron commands to execute Cron []CronCommand `json:"cron"` // Formation is a map of process types to scale Formation map[string]Formation `json:"formation"` // Healthchecks is a map of process types to healthchecks Healthchecks map[string][]Healthcheck `json:"healthchecks"` // Scripts is a map of scripts to execute Scripts struct { // Dokku is a map of scripts to execute for Dokku-specific events Dokku struct { // Predeploy is a script to execute before a deploy Predeploy string `json:"predeploy"` // Postdeploy is a script to execute after a deploy Postdeploy string `json:"postdeploy"` } `json:"dokku"` // Postdeploy is a script to execute after a deploy Postdeploy string `json:"postdeploy"` } `json:"scripts"` }
AppJSON is a struct that represents an app.json file as understood by Dokku
func GetAppJSON ¶
GetAppJSON returns the parsed app.json file for a given app
type CronCommand ¶
type CronCommand struct { // Command is the command to execute Command string `json:"command"` // Schedule is the cron schedule to execute the command on Schedule string `json:"schedule"` }
CronCommand is a struct that represents a single cron command from an app.json file
type Formation ¶
type Formation struct { // Autoscaling is whether or not to enable autoscaling Autoscaling *FormationAutoscaling `json:"autoscaling"` // Quantity is the number of processes to run Quantity *int `json:"quantity"` // MaxParallel is the maximum number of processes to start in parallel MaxParallel *int `json:"max_parallel"` }
Formation is a struct that represents the scale for a process from an app.json file
type FormationAutoscaling ¶
type FormationAutoscaling struct { // CoolDownSeconds is the number of seconds to wait before scaling again CooldownPeriodSeconds *int `json:"cooldown_period_seconds,omitempty"` // MaxQuantity is the maximum number of processes to run MaxQuantity *int `json:"max_quantity,omitempty"` // MinQuantity is the minimum number of processes to run MinQuantity *int `json:"min_quantity,omitempty"` // PollingIntervalSeconds is the number of seconds to wait between autoscaling checks PollingIntervalSeconds *int `json:"polling_interval_seconds,omitempty"` // Triggers is a list of triggers to use for autoscaling Triggers []FormationAutoscalingTrigger `json:"triggers,omitempty"` }
FormationAutoscaling is a struct that represents the autoscaling configuration for a process from an app.json file
func GetAutoscalingConfig ¶
type FormationAutoscalingTrigger ¶
type FormationAutoscalingTrigger struct { // Name is the name of the trigger Name string `json:"name,omitempty"` // Type is the type of the trigger Type string `json:"type,omitempty"` // Metadata is a map of metadata to use for the trigger Metadata map[string]string `json:"metadata,omitempty"` }
FormationAutoscalingTrigger is a struct that represents a single autoscaling trigger from an app.json file
type HTTPHeader ¶
type HTTPHeader struct { // Name is the name of the HTTP header Name string `json:"name,omitempty"` // Value is the value of the HTTP header Value string `json:"value,omitempty"` }
HTTPHeader is a struct that represents a single HTTP header associated with a healthcheck
type Healthcheck ¶
type Healthcheck struct { // Attempts is the number of attempts to make before considering a healthcheck failed Attempts int32 `json:"attempts,omitempty"` // Command is the command to execute for the healthcheck Command []string `json:"command,omitempty"` // Content is the content to check for in the healthcheck response Content string `json:"content,omitempty"` // HTTPHeaders is a list of HTTP headers to send with the healthcheck request HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"` // InitialDelay is the number of seconds to wait before starting healthchecks InitialDelay int32 `json:"initialDelay,omitempty"` // Listening is whether or not this is a listening check Listening bool `json:"listening,omitempty"` // Name is the name of the healthcheck Name string `json:"name,omitempty"` // Path is the path to check for in the healthcheck response Path string `json:"path,omitempty"` // Port is the port to check for in the healthcheck response Port int `json:"port,omitempty"` // Scheme is the scheme to use for the healthcheck request Scheme string `json:"scheme,omitempty"` // Timeout is the number of seconds to wait before considering a healthcheck failed Timeout int32 `json:"timeout,omitempty"` // Type is the type of healthcheck Type HealthcheckType `json:"type,omitempty"` // Uptime is the number of seconds to wait before considering a container running Uptime int32 `json:"uptime,omitempty"` // Wait is the number of seconds to wait between healthchecks Wait int32 `json:"wait,omitempty"` // Warn is whether or not to warn on a failed healthcheck instead of error out Warn bool `json:"warn,omitempty"` // OnFailure is the action to take on a failed healthcheck OnFailure *OnFailure `json:"onFailure,omitempty"` }
Healthcheck is a struct that represents a single healthcheck from an app.json file
type HealthcheckType ¶
type HealthcheckType string
HealthcheckType is a string that represents the type of a healthcheck from an app.json file
const ( // HealthcheckType_Liveness is a healthcheck type that represents a liveness check HealthcheckType_Liveness HealthcheckType = "liveness" // HealthcheckType_Readiness is a healthcheck type that represents a readiness check HealthcheckType_Readiness HealthcheckType = "readiness" // HealthcheckType_Startup is a healthcheck type that represents a startup check HealthcheckType_Startup HealthcheckType = "startup" )