opencost

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationEntry

type AllocationEntry struct {
	Name       string `json:"name"`
	Properties struct {
	} `json:"properties"`
	Window struct {
		Start time.Time `json:"start"`
		End   time.Time `json:"end"`
	} `json:"window"`
	Start                          time.Time                    `json:"start"`
	End                            time.Time                    `json:"end"`
	Minutes                        float64                      `json:"minutes"`
	CpuCores                       float64                      `json:"cpuCores"`
	CpuCoreRequestAverage          float64                      `json:"cpuCoreRequestAverage"`
	CpuCoreUsageAverage            float64                      `json:"cpuCoreUsageAverage"`
	CpuCoreHours                   float64                      `json:"cpuCoreHours"`
	CpuCost                        float64                      `json:"cpuCost"`
	CpuCostAdjustment              float64                      `json:"cpuCostAdjustment"`
	CpuEfficiency                  float64                      `json:"cpuEfficiency"`
	GpuCount                       float64                      `json:"gpuCount"`
	GpuHours                       float64                      `json:"gpuHours"`
	GpuCost                        float64                      `json:"gpuCost"`
	GpuCostAdjustment              float64                      `json:"gpuCostAdjustment"`
	NetworkTransferBytes           float64                      `json:"networkTransferBytes"`
	NetworkReceiveBytes            float64                      `json:"networkReceiveBytes"`
	NetworkCost                    float64                      `json:"networkCost"`
	NetworkCrossZoneCost           float64                      `json:"networkCrossZoneCost"`
	NetworkCrossRegionCost         float64                      `json:"networkCrossRegionCost"`
	NetworkInternetCost            float64                      `json:"networkInternetCost"`
	NetworkCostAdjustment          float64                      `json:"networkCostAdjustment"`
	LoadBalancerCost               float64                      `json:"loadBalancerCost"`
	LoadBalancerCostAdjustment     float64                      `json:"loadBalancerCostAdjustment"`
	PvBytes                        float64                      `json:"pvBytes"`
	PvByteHours                    float64                      `json:"pvByteHours"`
	PvCost                         float64                      `json:"pvCost"`
	Pvs                            map[string]AllocationPvEntry `json:"pvs"`
	PvCostAdjustment               float64                      `json:"pvCostAdjustment"`
	RamBytes                       float64                      `json:"ramBytes"`
	RamByteRequestAverage          float64                      `json:"ramByteRequestAverage"`
	RamByteUsageAverage            float64                      `json:"ramByteUsageAverage"`
	RamByteHours                   float64                      `json:"ramByteHours"`
	RamCost                        float64                      `json:"ramCost"`
	RamCostAdjustment              float64                      `json:"ramCostAdjustment"`
	RamEfficiency                  float64                      `json:"ramEfficiency"`
	ExternalCost                   float64                      `json:"externalCost"`
	SharedCost                     float64                      `json:"sharedCost"`
	TotalCost                      float64                      `json:"totalCost"`
	TotalEfficiency                float64                      `json:"totalEfficiency"`
	ProportionalAssetResourceCosts struct {
	} `json:"proportionalAssetResourceCosts"`
	LbAllocations       interface{} `json:"lbAllocations"`
	SharedCostBreakdown struct {
	} `json:"sharedCostBreakdown"`
}

type AllocationOptions

type AllocationOptions struct {
	Window    string
	Aggregate string
}

type AllocationPvEntry

type AllocationPvEntry struct {
	ByteHours  float64 `json:"byteHours"`
	Cost       float64 `json:"cost"`
	ProviderID string  `json:"providerID"`
}

type AllocationResponse

type AllocationResponse struct {
	Code   int                          `json:"code"`
	Status string                       `json:"status"`
	Data   []map[string]AllocationEntry `json:"data"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config configuration.Config) (*Client, error)

func (*Client) Allocation

func (c *Client) Allocation(options *AllocationOptions) (AllocationResponse, error)

Jump to

Keyboard shortcuts

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