mcs

package
v1.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterCost

type ClusterCost struct {
	TotalCost          *float64      `json:"totalCost,omitempty"`
	Namespaces         []*Namespace  `json:"namespaces,omitempty"`
	Deployments        []*Deployment `json:"deployments,omitempty"`
	StandAlonePodsCost *float64      `json:"standAlonePodsCost,omitempty"`
	HeadroomCost       *float64      `json:"headroomCost,omitempty"`
}

type ClusterCostInput

type ClusterCostInput struct {
	ClusterID *string `json:"clusterId,omitempty"`
	ToDate    *string `json:"toDate,omitempty"`
	FromDate  *string `json:"fromDate,omitempty"`
}

type ClusterCostOutput

type ClusterCostOutput struct {
	ClusterCosts []*ClusterCost `json:"clusterCosts,omitempty"`
}

type Deployment

type Deployment struct {
	DeploymentName *string  `json:"deploymentName,omitempty"`
	Namespace      *string  `json:"namespace,omitempty"`
	Cost           *float64 `json:"cost,omitempty"`
}

type Namespace

type Namespace struct {
	Namespace *string  `json:"namespace,omitempty"`
	Cost      *float64 `json:"cost,omitempty"`
}

type Service

type Service interface {
	GetClusterCosts(context.Context, *ClusterCostInput) (*ClusterCostOutput, error)
}

Service provides the API operation methods for making requests to endpoints of the Spotinst API. See this package's package overview docs for details on the service.

type ServiceOp

type ServiceOp struct {
	Client *client.Client
}

func New

func New(sess *session.Session, cfgs ...*spotinst.Config) *ServiceOp

func (*ServiceOp) GetClusterCosts

func (s *ServiceOp) GetClusterCosts(ctx context.Context, input *ClusterCostInput) (*ClusterCostOutput, error)

GetClusterCosts accepts kubernetes clusterId, fromDate, and toDate and returns a list of costs. Dates may be in the format of yyyy-mm-dd or Unix Timestamp (1494751821472)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL