GetNodeGroupStackType returns the nodegroup stack type
(ctx context.Context, options GetNodegroupOption)
| 403 | |
| 404 | // GetNodeGroupStackType returns the nodegroup stack type |
| 405 | func (c *StackCollection) GetNodeGroupStackType(ctx context.Context, options GetNodegroupOption) (api.NodeGroupType, error) { |
| 406 | var ( |
| 407 | err error |
| 408 | stack *Stack |
| 409 | ) |
| 410 | if options.Stack != nil && options.Stack.Stack != nil { |
| 411 | stack = options.Stack.Stack |
| 412 | } |
| 413 | if stack == nil { |
| 414 | stack, err = c.DescribeNodeGroupStack(ctx, options.NodeGroupName) |
| 415 | if err != nil { |
| 416 | return "", err |
| 417 | } |
| 418 | } |
| 419 | return GetNodeGroupType(stack.Tags) |
| 420 | } |
| 421 | |
| 422 | // GetNodeGroupType returns the nodegroup type |
| 423 | func GetNodeGroupType(tags []types.Tag) (api.NodeGroupType, error) { |
no test coverage detected