Documentation ¶
Index ¶
- Variables
- func MsSince(start time.Time) float64
- func RegionFromContext(ctx context.Context) string
- func RegisterPrometheus()
- func WithRegion(ctx context.Context, region string) context.Context
- type ClientInterface
- type Cluster
- type Clusters
- type DescribeClusterUserKubeconfigResp
- type OpenAPI
- func (a *OpenAPI) DescribeClusterDetail(ctx context.Context, clusterID string) (*Cluster, error)
- func (a *OpenAPI) DescribeClusterUserKubeconfig(ctx context.Context, clusterID string, privateAddr bool) ([]byte, error)
- func (a *OpenAPI) DescribeClustersV1Request(ctx context.Context) ([]Cluster, error)
- func (a *OpenAPI) DescribeInstances(ctx context.Context, vpcID string) ([]ecs.Instance, error)
- func (a *OpenAPI) DescribeNetworkInterface(ctx context.Context, networkInterfaceID, nicType string) ([]ecs.NetworkInterfaceSet, error)
- func (a *OpenAPI) DescribeVSwitches(ctx context.Context, vpcID string) ([]vpc.VSwitch, error)
- type PageInfo
- type SimpleClient
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenAPILatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "aliyun_openapi_latency", Help: "aliyun openapi latency in ms", Buckets: []float64{50, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 13800, 14800, 16800, 20800, 28800, 44800}, }, []string{"api", "error"}, )
Functions ¶
func RegionFromContext ¶
func RegisterPrometheus ¶
func RegisterPrometheus()
RegisterPrometheus register metrics to prometheus server
Types ¶
type ClientInterface ¶
func NewSimpleClient ¶
func NewSimpleClient() (ClientInterface, error)
type Cluster ¶
type Cluster struct { Name string `json:"name"` ClusterID string `json:"cluster_id"` RegionID string `json:"region_id"` Size int `json:"size"` State string `json:"state"` ClusterType string `json:"cluster_type"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` CurrentVersion string `json:"current_version"` ResourceGroupID string `json:"resource_group_id"` VPCID string `json:"vpc_id"` VSwitchID string `json:"vswitch_id"` SecurityGroupID string `json:"security_group_id"` ZoneID string `json:"zone_id"` ExternalLoadbalancerID string `json:"external_loadbalancer_id"` }
type DescribeClusterUserKubeconfigResp ¶
type DescribeClusterUserKubeconfigResp struct {
Config string `json:"config"`
}
type OpenAPI ¶
type OpenAPI struct { ReadOnlyRateLimiter flowcontrol.RateLimiter // contains filtered or unexported fields }
func NewOpenAPI ¶
func (*OpenAPI) DescribeClusterDetail ¶
func (*OpenAPI) DescribeClusterUserKubeconfig ¶
func (*OpenAPI) DescribeClustersV1Request ¶
func (*OpenAPI) DescribeInstances ¶
func (*OpenAPI) DescribeNetworkInterface ¶
type SimpleClient ¶
type SimpleClient struct {
// contains filtered or unexported fields
}
func (*SimpleClient) CS ¶
func (c *SimpleClient) CS() *cs.Client
func (*SimpleClient) ECS ¶
func (c *SimpleClient) ECS() *ecs.Client
func (*SimpleClient) VPC ¶
func (c *SimpleClient) VPC() *vpc.Client
Click to show internal directories.
Click to hide internal directories.