Documentation
¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewPricingAPI(sess *session.Session, region string) pricingiface.PricingAPI
- type Provider
- func (p *Provider) FargatePrice(cpu, memory float64) (float64, bool)
- func (p *Provider) InstanceTypes() []string
- func (p *Provider) LivenessProbe(req *http.Request) error
- func (p *Provider) OnDemandLastUpdated() time.Time
- func (p *Provider) OnDemandPrice(instanceType string) (float64, bool)
- func (p *Provider) SpotLastUpdated() time.Time
- func (p *Provider) SpotPrice(instanceType string, zone string) (float64, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPricingAPI ¶
func NewPricingAPI(sess *session.Session, region string) pricingiface.PricingAPI
NewPricingAPI returns a pricing API configured based on a particular region
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides actual pricing data to the AWS cloud provider to allow it to make more informed decisions regarding which instances to launch. This is initialized at startup with a periodically updated static price list to support running in locations where pricing data is unavailable. In those cases the static pricing data provides a relative ordering that is still more accurate than our previous pricing model. In the event that a pricing update fails, the previous pricing information is retained and used which may be the static initial pricing data if pricing updates never succeed.
func NewStaticProvider ¶
func NewStaticProvider() *Provider
func (*Provider) FargatePrice ¶ added in v0.2.0
func (*Provider) InstanceTypes ¶
InstanceTypes returns the list of all instance types for which either a spot or on-demand price is known.
func (*Provider) OnDemandLastUpdated ¶
OnDemandLastUpdated returns the time that the on-demand pricing was last updated
func (*Provider) OnDemandPrice ¶
OnDemandPrice returns the last known on-demand price for a given instance type, returning an error if there is no known on-demand pricing for the instance type.
func (*Provider) SpotLastUpdated ¶
SpotLastUpdated returns the time that the spot pricing was last updated