本文整理汇总了Golang中github.com/convox/rack/cmd/convox/stdcli.RegisterCommand函数的典型用法代码示例。如果您正苦于以下问题:Golang RegisterCommand函数的具体用法?Golang RegisterCommand怎么用?Golang RegisterCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RegisterCommand函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "start",
Description: "start an app for local development",
Usage: "[directory]",
Action: cmdStart,
Flags: []cli.Flag{
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "a file to use in place of docker-compose.yml",
},
cli.BoolFlag{
Name: "no-cache",
Usage: "Do not use Docker cache during build.",
},
},
})
stdcli.RegisterCommand(cli.Command{
Name: "init",
Description: "initialize an app for local development",
Usage: "[directory]",
Action: cmdInit,
})
}
开发者ID:cozmo,项目名称:rack,代码行数:25,代码来源:start.go
示例2: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "start",
Description: "start an app for local development",
Usage: "[directory]",
Action: cmdStart,
Flags: []cli.Flag{
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "path to an alternate docker compose manifest file",
},
cli.BoolFlag{
Name: "no-cache",
Usage: "pull fresh image dependencies",
},
cli.BoolTFlag{
Name: "sync",
Usage: "synchronize local file changes into the running containers",
},
},
})
stdcli.RegisterCommand(cli.Command{
Name: "init",
Description: "initialize an app for local development",
Usage: "[directory]",
Action: cmdInit,
})
}
开发者ID:cleblanc87,项目名称:rack,代码行数:29,代码来源:start.go
示例3: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "build",
Description: "create a new build",
Usage: "",
Action: cmdBuildsCreate,
Flags: buildCreateFlags,
})
stdcli.RegisterCommand(cli.Command{
Name: "builds",
Description: "manage an app's builds",
Usage: "",
Action: cmdBuilds,
Flags: []cli.Flag{appFlag, rackFlag},
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new build",
Usage: "",
Action: cmdBuildsCreate,
Flags: buildCreateFlags,
},
{
Name: "copy",
Description: "copy a build to an app",
Usage: "<ID> <app>",
Action: cmdBuildsCopy,
Flags: []cli.Flag{
appFlag,
rackFlag,
cli.BoolFlag{
Name: "promote",
Usage: "promote the release after copy",
},
},
},
{
Name: "info",
Description: "print output for a build",
Usage: "<ID>",
Action: cmdBuildsInfo,
Flags: []cli.Flag{appFlag, rackFlag},
},
{
Name: "delete",
Description: "Archive a build and its artifacts",
Usage: "<ID>",
Action: cmdBuildsDelete,
Flags: []cli.Flag{appFlag, rackFlag},
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:53,代码来源:builds.go
示例4: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "build",
Description: "create a new build",
Usage: "",
Action: cmdBuildsCreate,
Flags: []cli.Flag{
appFlag,
cli.BoolFlag{
Name: "no-cache",
Usage: "Do not use Docker cache during build.",
},
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "a file to use in place of docker-compose.yml",
},
},
})
stdcli.RegisterCommand(cli.Command{
Name: "builds",
Description: "manage an app's builds",
Usage: "",
Action: cmdBuilds,
Flags: []cli.Flag{appFlag},
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new build",
Usage: "",
Action: cmdBuildsCreate,
Flags: []cli.Flag{
appFlag,
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "a file to use in place of docker-compose.yml",
},
},
},
{
Name: "info",
Description: "print output for a build",
Usage: "<ID>",
Action: cmdBuildsInfo,
Flags: []cli.Flag{appFlag},
},
},
})
}
开发者ID:anthonyrisinger,项目名称:rack,代码行数:50,代码来源:builds.go
示例5: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "start",
Description: "start an app for local development",
Usage: "[directory]",
Action: cmdStart,
})
stdcli.RegisterCommand(cli.Command{
Name: "init",
Description: "initialize an app for local development",
Usage: "[directory]",
Action: cmdInit,
})
}
开发者ID:harryross,项目名称:rack,代码行数:14,代码来源:start.go
示例6: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "builds",
Description: "manage an app's builds",
Usage: "",
Action: cmdBuilds,
Flags: []cli.Flag{appFlag},
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new build",
Usage: "",
Action: cmdBuildsCreate,
Flags: []cli.Flag{appFlag},
},
{
Name: "info",
Description: "print output for a build",
Usage: "<ID>",
Action: cmdBuildsInfo,
Flags: []cli.Flag{appFlag},
},
},
})
}
开发者ID:jbuck,项目名称:rack,代码行数:25,代码来源:builds.go
示例7: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "env",
Description: "manage an app's environment variables",
Usage: "[get|set|unset]",
Action: cmdEnvList,
Flags: []cli.Flag{appFlag},
Subcommands: []cli.Command{
{
Name: "get",
Description: "get all environment variables",
Usage: "VARIABLE",
Action: cmdEnvGet,
Flags: []cli.Flag{appFlag},
},
{
Name: "set",
Description: "set an environment variable",
Usage: "VARIABLE=VALUE",
Action: cmdEnvSet,
Flags: []cli.Flag{appFlag},
},
{
Name: "unset",
Description: "delete an environment varible",
Usage: "VARIABLE",
Action: cmdEnvUnset,
Flags: []cli.Flag{appFlag},
},
},
})
}
开发者ID:harryross,项目名称:rack,代码行数:32,代码来源:env.go
示例8: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "doctor",
Action: cmdDoctor,
Description: "Check your app for common Convox compatibility issues.",
})
}
开发者ID:convox,项目名称:rack,代码行数:7,代码来源:doctor.go
示例9: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "deploy",
Description: "deploy an app to AWS",
Usage: "<directory>",
Action: cmdDeploy,
Flags: []cli.Flag{
appFlag,
cli.BoolFlag{
Name: "no-cache",
Usage: "pull fresh image dependencies",
},
cli.BoolFlag{
Name: "incremental",
Usage: "use incremental build",
},
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "location of docker-compose.yml",
},
cli.StringFlag{
Name: "description",
Value: "",
Usage: "description of the build",
},
},
})
}
开发者ID:soulware,项目名称:rack,代码行数:29,代码来源:deploy.go
示例10: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "logs",
Description: "stream the logs for an application",
Usage: "",
Action: cmdLogsStream,
Flags: []cli.Flag{
appFlag,
rackFlag,
cli.StringFlag{
Name: "filter",
Usage: "filter the logs by a given token",
},
cli.BoolTFlag{
Name: "follow",
Usage: "keep streaming new log output (default)",
},
cli.DurationFlag{
Name: "since",
Usage: "show logs since a duration (e.g. 10m or 1h2m10s)",
Value: 2 * time.Minute,
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:25,代码来源:logs.go
示例11: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "scale",
Description: "scale an app's processes",
Usage: "<process> [--count=2] [--memory=256] [--cpu=256]",
Action: cmdScale,
Flags: []cli.Flag{
appFlag,
rackFlag,
cli.IntFlag{
Name: "count",
Usage: "Number of processes to keep running for specified process type.",
},
cli.IntFlag{
Name: "memory",
Usage: "Amount of memory, in MB, available to specified process type.",
},
cli.IntFlag{
Name: "cpu",
Usage: "CPU units available to specified process type.",
},
cli.BoolFlag{
Name: "wait",
Usage: "wait for app to finish scaling before returning",
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:28,代码来源:scale.go
示例12: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "ssl",
Action: cmdSSLList,
Description: "manage SSL certificates",
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new SSL listener",
Usage: "<port> <foo.crt> <foo.key>",
Action: cmdSSLCreate,
Flags: []cli.Flag{
appFlag,
},
},
{
Name: "delete",
Description: "delete an SSL listener",
Usage: "<port>",
Action: cmdSSLDelete,
Flags: []cli.Flag{
appFlag,
},
},
},
})
}
开发者ID:nicolas-brousse,项目名称:rack,代码行数:27,代码来源:ssl.go
示例13: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "rack",
Description: "manage your Convox rack",
Usage: "",
Action: cmdRack,
Subcommands: []cli.Command{
{
Name: "update",
Description: "update rack to the latest version",
Usage: "[version]",
Action: cmdRackUpdate,
},
{
Name: "scale",
Description: "scale the rack capacity",
Usage: "",
Action: cmdRackScale,
Flags: []cli.Flag{
cli.IntFlag{
Name: "count",
Usage: "horizontally scale the instance count, e.g. 3 or 10",
},
cli.StringFlag{
Name: "type",
Usage: "vertically scale the instance type, e.g. t2.small or c3.xlargs",
},
},
},
},
})
}
开发者ID:jbuck,项目名称:rack,代码行数:32,代码来源:rack.go
示例14: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "instances",
Description: "list your Convox rack's instances",
Usage: "",
Action: cmdInstancesList,
Flags: []cli.Flag{rackFlag},
Subcommands: []cli.Command{
{
Name: "keyroll",
Description: "generate and replace the ec2 keypair used for SSH",
Usage: "",
Action: cmdInstancesKeyroll,
Flags: []cli.Flag{rackFlag},
},
{
Name: "ssh",
Description: "establish secure shell with EC2 instance",
Usage: "<id> [command]",
Action: cmdInstancesSSH,
Flags: []cli.Flag{rackFlag},
SkipFlagParsing: true,
},
{
Name: "terminate",
Description: "terminate an EC2 instance",
Usage: "<id>",
Flags: []cli.Flag{rackFlag},
Action: cmdInstancesTerminate,
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:33,代码来源:instances.go
示例15: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "services",
Description: "manage services",
Usage: "",
Action: cmdServices,
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new service",
Usage: "<type> <name>",
Action: cmdServiceCreate,
},
{
Name: "delete",
Description: "delete a service",
Usage: "<name>",
Action: cmdServiceDelete,
},
{
Name: "info",
Description: "info about a service",
Usage: "<name>",
Action: cmdServiceInfo,
},
},
})
}
开发者ID:harryross,项目名称:rack,代码行数:28,代码来源:services.go
示例16: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "releases",
Description: "list an app's releases",
Usage: "",
Action: cmdReleases,
Flags: []cli.Flag{appFlag},
Subcommands: []cli.Command{
{
Name: "info",
Description: "see info about a release",
Usage: "<release id>",
Action: cmdReleaseInfo,
Flags: []cli.Flag{appFlag},
},
{
Name: "promote",
Description: "promote a release",
Usage: "<release id>",
Action: cmdReleasePromote,
Flags: []cli.Flag{appFlag},
},
},
})
}
开发者ID:cleblanc87,项目名称:rack,代码行数:25,代码来源:releases.go
示例17: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "apps",
Action: cmdApps,
Description: "list deployed apps",
Subcommands: []cli.Command{
{
Name: "create",
Description: "create a new application",
Usage: "[name]",
Action: cmdAppCreate,
},
{
Name: "delete",
Description: "delete an application",
Usage: "[name]",
Action: cmdAppDelete,
},
{
Name: "info",
Description: "see info about an app",
Usage: "",
Action: cmdAppInfo,
Flags: []cli.Flag{appFlag},
},
},
})
}
开发者ID:harryross,项目名称:rack,代码行数:28,代码来源:apps.go
示例18: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "releases",
Description: "list an app's releases",
Usage: "",
Action: cmdReleases,
Flags: []cli.Flag{appFlag, rackFlag},
Subcommands: []cli.Command{
{
Name: "info",
Description: "see info about a release",
Usage: "<release id>",
Action: cmdReleaseInfo,
Flags: []cli.Flag{appFlag, rackFlag},
},
{
Name: "promote",
Description: "promote a release",
Usage: "<release id>",
Action: cmdReleasePromote,
Flags: []cli.Flag{
appFlag,
rackFlag,
cli.BoolFlag{
Name: "wait",
Usage: "wait for release to finish promoting before returning",
},
},
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:32,代码来源:releases.go
示例19: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "api",
Description: "api endpoint",
Usage: "",
Action: cmdApi,
Flags: []cli.Flag{rackFlag},
Subcommands: []cli.Command{
{
Name: "get",
Description: "get an api endpoint",
Usage: "<endpoint>",
Action: cmdApiGet,
Flags: []cli.Flag{rackFlag},
},
{
Name: "delete",
Description: "delete an api endpoint",
Usage: "<endpoint>",
Action: cmdApiDelete,
Flags: []cli.Flag{rackFlag},
},
},
})
}
开发者ID:gmelika,项目名称:rack,代码行数:25,代码来源:api.go
示例20: init
func init() {
stdcli.RegisterCommand(cli.Command{
Name: "start",
Description: "start an app for local development",
Usage: "[service] [command]",
Action: cmdStart,
Flags: []cli.Flag{
cli.StringFlag{
Name: "file, f",
Value: "docker-compose.yml",
Usage: "path to an alternate docker compose manifest file",
},
cli.BoolFlag{
Name: "no-cache",
Usage: "Pull fresh image dependencies",
},
cli.IntFlag{
Name: "shift",
Usage: "shift allocated port numbers by the given amount",
},
cli.BoolFlag{
Name: "no-sync",
Usage: "do not synchronize local file changes into the running containers",
},
},
})
}
开发者ID:convox,项目名称:rack,代码行数:27,代码来源:start.go
注:本文中的github.com/convox/rack/cmd/convox/stdcli.RegisterCommand函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论