Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterToSQLPredicates ¶
func FilterToSQLPredicates(filters types.CostFilters) *sql.Predicate
FilterToSQLPredicates create sql predicate from filters.
Types ¶
type CalculateInfo ¶
type Cost ¶
type Cost struct { Currency int `json:"currency,omitempty"` TotalCost float64 `json:"totalCost,omitempty"` CPUCost float64 `json:"cpuCost,omitempty"` GPUCost float64 `json:"gpuCost,omitempty"` RAMCost float64 `json:"ramCost,omitempty"` PVCost float64 `json:"pvCost,omitempty"` LoadBalancerCost float64 `json:"loadBalancerCost,omitempty"` }
type CostPerConnector ¶
type Distributor ¶
type Distributor struct {
// contains filtered or unexported fields
}
Distributor support use input condition to query resources costs, and split the shared costs base on the condition defined, while the condition with the step(day, month etc.), will return the resource cost for each time bucket, like namespace cost per day, without step will return the resource total cost within the queried time range.
func New ¶
func New(client model.ClientSet) *Distributor
func (*Distributor) Distribute ¶
func (d *Distributor) Distribute( ctx context.Context, startTime, endTime time.Time, cond types.QueryCondition, ) ([]Resource, int, error)
type ItemSharedCost ¶
type ItemSharedCost struct {}
type SharedCostConnectors ¶
type SharedCostConnectors struct {}
Click to show internal directories.
Click to hide internal directories.