Documentation ¶
Index ¶
- Constants
- type HandlerFunc
- type ParallelTask
- type QueryClientImpl
- func (q *QueryClientImpl) GetInstanceDetails(region, instanceType string) *apis.InstanceTypePrice
- func (q *QueryClientImpl) ListInstancesDetails(region string) *apis.RegionalInstancePrice
- func (q *QueryClientImpl) ListRegions() []string
- func (q *QueryClientImpl) Run(ctx context.Context)
- func (q *QueryClientImpl) Sync() error
- type QueryClientInterface
Constants ¶
View Source
const ( AlibabaCloudProvider = "alibabacloud" AWSCloudProvider = "aws" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(paras ...interface{})
type ParallelTask ¶
type ParallelTask struct {
// contains filtered or unexported fields
}
func NewParallelTask ¶
func NewParallelTask(handlerFunc HandlerFunc) *ParallelTask
func (*ParallelTask) Add ¶
func (p *ParallelTask) Add(params []interface{})
func (*ParallelTask) Process ¶
func (p *ParallelTask) Process()
type QueryClientImpl ¶
type QueryClientImpl struct {
// contains filtered or unexported fields
}
func (*QueryClientImpl) GetInstanceDetails ¶
func (q *QueryClientImpl) GetInstanceDetails(region, instanceType string) *apis.InstanceTypePrice
func (*QueryClientImpl) ListInstancesDetails ¶
func (q *QueryClientImpl) ListInstancesDetails(region string) *apis.RegionalInstancePrice
func (*QueryClientImpl) ListRegions ¶
func (q *QueryClientImpl) ListRegions() []string
func (*QueryClientImpl) Run ¶
func (q *QueryClientImpl) Run(ctx context.Context)
func (*QueryClientImpl) Sync ¶
func (q *QueryClientImpl) Sync() error
type QueryClientInterface ¶
type QueryClientInterface interface { // Run is used to sync the data periodically Run(ctx context.Context) // Sync is used to sync the data manually if want to work with your own scheduling mechanism Sync() error // ListRegions returns a list of the supported regions ListRegions() []string // ListInstancesDetails returns the details of the supported instances in one region ListInstancesDetails(region string) *apis.RegionalInstancePrice // GetInstanceDetails returns the details of the specified instance GetInstanceDetails(region, instanceType string) *apis.InstanceTypePrice }
func NewQueryClient ¶
func NewQueryClient(endpoint, cloudProvider, region string) (QueryClientInterface, error)
Click to show internal directories.
Click to hide internal directories.