当前位置: 首页>>代码示例>>Golang>>正文


Golang ecs.Project类代码示例

本文整理汇总了Golang中github.com/aws/amazon-ecs-cli/ecs-cli/modules/compose/ecs.Project的典型用法代码示例。如果您正苦于以下问题:Golang Project类的具体用法?Golang Project怎么用?Golang Project使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Project类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: ProjectPs

// ProjectPs lists the containers.
func ProjectPs(p ecscompose.Project, c *cli.Context) {
	allInfo, err := p.Info()
	if err != nil {
		log.Fatal(err)
	}
	os.Stdout.WriteString(allInfo.String())
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:8,代码来源:app.go

示例2: loadProject

// loadProject opens the project by loading configs
func (projectFactory projectFactory) loadProject(project ecscompose.Project) error {
	err := project.Parse()
	if err != nil {
		utils.LogError(err, "Unable to open ECS Compose Project")
	}
	return err
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:8,代码来源:factory.go

示例3: ProjectPs

// ProjectPs lists the containers.
func ProjectPs(p ecscompose.Project, c *cli.Context) {
	allInfo, err := p.Info()
	if err != nil {
		log.Fatal(err)
	}
	os.Stdout.WriteString(allInfo.String(ecscompose.ContainerInfoColumns, displayTitle))
}
开发者ID:uttarasridhar,项目名称:amazon-ecs-cli,代码行数:8,代码来源:app.go

示例4: ProjectScale

// ProjectScale scales containers.
func ProjectScale(p ecscompose.Project, c *cli.Context) {
	if len(c.Args()) != 1 {
		log.Fatal("Please pass arguments in the form: ecs-cli compose scale COUNT")
	}
	count, err := strconv.Atoi(c.Args().First())
	if err != nil {
		log.Fatal("Please pass an integer value for argument COUNT")
	}
	err = p.Scale(count)
	if err != nil {
		log.Fatal(err)
	}
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:14,代码来源:app.go

示例5: ProjectRun

// ProjectRun starts containers and executes one-time command against the container
func ProjectRun(p ecscompose.Project, c *cli.Context) {
	args := c.Args()
	if len(args)%2 != 0 {
		log.Fatal("Please pass arguments in the form: CONTAINER COMMAND [CONTAINER COMMAND]...")
	}
	commandOverrides := make(map[string]string)
	for i := 0; i < len(args); i += 2 {
		commandOverrides[args[i]] = args[i+1]
	}
	err := p.Run(commandOverrides)
	if err != nil {
		log.Fatal(err)
	}
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:15,代码来源:app.go

示例6: ProjectUp

// ProjectUp brings all containers up.
func ProjectUp(p ecscompose.Project, c *cli.Context) {
	err := p.Up()
	if err != nil {
		log.Fatal(err)
	}
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:7,代码来源:app.go

示例7: ProjectCreate

// ProjectCreate creates the task definition required for the containers but does not start them.
func ProjectCreate(p ecscompose.Project, c *cli.Context) {
	err := p.Create()
	if err != nil {
		log.Fatal(err)
	}
}
开发者ID:jloper3,项目名称:amazon-ecs-cli,代码行数:7,代码来源:app.go


注:本文中的github.com/aws/amazon-ecs-cli/ecs-cli/modules/compose/ecs.Project类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。