Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultJsonnetNativeFuncs() []*jsonnet.NativeFunction
- type Application
- type ApplicationInfo
- type CLI
- func (c *CLI) AllTraffics(ctx context.Context, appId string) func(func(*v1.Traffic, error) bool)
- func (c *CLI) AllVersions(ctx context.Context, appId string) func(func(*v1.Version, error) bool)
- func (c *CLI) LoadApplication(ctx context.Context, name string) (*Application, error)
- func (c *CLI) Run(ctx context.Context) error
- type DeleteOption
- type DeployOption
- type DiffOption
- type InitOption
- type ListOption
- type RenderOption
- type StatusOption
- type TrafficPercentageByVersion
- type TrafficsOption
- type UserOption
- type VersionsOption
Constants ¶
View Source
const DiffIgnoreDefault = ".components[].deploy_source.container_registry.password"
View Source
const TrafficShiftDefaultPeriod = time.Minute
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("not found")
View Source
var Version = "v0.7.0"
Functions ¶
func DefaultJsonnetNativeFuncs ¶
func DefaultJsonnetNativeFuncs() []*jsonnet.NativeFunction
Types ¶
type Application ¶
type Application struct {
// same as v1.PostApplicationBody
Components []v1.PostApplicationBodyComponent `json:"components"`
MaxScale int `json:"max_scale"`
MinScale int `json:"min_scale"`
Name string `json:"name"`
Port int `json:"port"`
TimeoutSeconds int `json:"timeout_seconds"`
PacketFilter v1.PatchPacketFilter `json:"packet_filter,omitempty"`
}
Application represents an application definition This is combined struct of v1.PostApplicationBody and v1.PatchPacketFilter
func (*Application) PostApplicationBody ¶ added in v0.5.0
func (app *Application) PostApplicationBody() *v1.PostApplicationBody
PostApplicationBody returns v1.PostApplicationBody representation of Application
func (*Application) Validate ¶ added in v0.7.0
func (app *Application) Validate() error
type ApplicationInfo ¶
type ApplicationInfo = v1.HandlerListApplicationsData
type CLI ¶
type CLI struct {
List ListOption `cmd:"" help:"List applications"`
Init InitOption `cmd:"" help:"Initialize files from existing application"`
Deploy DeployOption `cmd:"" help:"Deploy an application"`
Diff DiffOption `cmd:"" help:"Show diff of applications"`
Render RenderOption `cmd:"" help:"Render application"`
Status StatusOption `cmd:"" help:"Show status of applications"`
Delete DeleteOption `cmd:"" help:"Delete the application"`
Versions VersionsOption `cmd:"" help:"Manage versions of application"`
Traffics TrafficsOption `cmd:"" help:"Manage traffics of application"`
User UserOption `cmd:"" help:"Manage apprun user"`
URL struct{} `cmd:"" help:"Show application public URL"`
Debug bool `help:"Enable debug mode" env:"DEBUG"`
Application string `name:"app" help:"Name of the application definition file" env:"APPRUN_CLI_APP"`
TFState string `name:"tfstate" help:"URL to terraform.tfstate" env:"APPRUN_CLI_TFSTATE"`
Version kong.VersionFlag `short:"v" help:"Show version and exit."`
// contains filtered or unexported fields
}
func (*CLI) AllTraffics ¶ added in v0.1.0
func (*CLI) AllVersions ¶ added in v0.0.2
func (*CLI) LoadApplication ¶ added in v0.3.0
type DeleteOption ¶
type DeleteOption struct {
Force bool `help:"Force delete without confirmation"`
}
type DeployOption ¶
type DeployOption struct {
AllTraffic bool `help:"Shift all traffic for the deployed version (default:true)" default:"true" negatable:""`
}
type DiffOption ¶
type DiffOption struct {
Ignore []string `help:"JQ queries to ignore specific fields"`
}
type InitOption ¶
type ListOption ¶
type ListOption struct {
}
type RenderOption ¶
type RenderOption struct {
Jsonnet bool `help:"Format as Jsonnet to render files"`
}
type StatusOption ¶
type StatusOption struct {
}
type TrafficPercentageByVersion ¶ added in v0.1.0
type TrafficsOption ¶ added in v0.1.0
type TrafficsOption struct {
Set TrafficPercentageByVersion `help:"Set traffic percentage for each version" mapsep:","`
ShiftTo string `help:"Shift all traffic to the specified version"`
Rate int `help:"Shift rate percentage(per minute)" default:"100"`
Period time.Duration `help:"Shift period" default:"1m"`
RollbackOnFailure bool `help:"Rollback to the previous version if failed to shift" default:"true" negatable:""`
}
type UserOption ¶
type UserOption struct {
Operation string `arg:"" enum:"create,read" help:"Operation to perform. One of: create, read"`
}
type VersionsOption ¶ added in v0.0.2
Source Files
¶
Click to show internal directories.
Click to hide internal directories.