本文整理匯總了Golang中github.com/juju/juju/apiserver/params.Entities.Entities方法的典型用法代碼示例。如果您正苦於以下問題:Golang Entities.Entities方法的具體用法?Golang Entities.Entities怎麽用?Golang Entities.Entities使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/juju/juju/apiserver/params.Entities
的用法示例。
在下文中一共展示了Entities.Entities方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ids2args
func ids2args(ids []string) params.Entities {
var args params.Entities
for _, id := range ids {
tag := names.NewPayloadTag(id).String()
args.Entities = append(args.Entities, params.Entity{
Tag: tag,
})
}
return args
}
示例2: RetryProvisioning
// RetryProvisioning updates the provisioning status of a machine allowing the
// provisioner to retry.
func (c *Client) RetryProvisioning(machines ...names.MachineTag) ([]params.ErrorResult, error) {
p := params.Entities{}
p.Entities = make([]params.Entity, len(machines))
for i, machine := range machines {
p.Entities[i] = params.Entity{Tag: machine.String()}
}
var results params.ErrorResults
err := c.facade.FacadeCall("RetryProvisioning", p, &results)
return results.Results, err
}
示例3: addFakeEntities
func addFakeEntities(actual params.Entities) params.Entities {
for _, entity := range commonFakeEntities {
actual.Entities = append(actual.Entities, entity)
}
return actual
}