Documentation ¶
Index ¶
Constants ¶
View Source
const TTL = time.Hour * 3
Variables ¶
This section is empty.
Functions ¶
func GetMetricPrefixName ¶
func SetDefaultConfigValues ¶
func SetDefaultConfigValues(config *CloudConfig)
Types ¶
type BaseHuaweiCloudExporter ¶
type BaseHuaweiCloudExporter struct { From string To string Namespaces []string Prefix string Metrics map[string]*prometheus.Desc MetricLen int ClientConfig *Config Region string MaxRoutines int // contains filtered or unexported fields }
func GetMonitoringCollector ¶
func GetMonitoringCollector(configpath string, namespaces []string) (*BaseHuaweiCloudExporter, error)
func (*BaseHuaweiCloudExporter) Collect ¶
func (exporter *BaseHuaweiCloudExporter) Collect(ch chan<- prometheus.Metric)
func (*BaseHuaweiCloudExporter) Describe ¶
func (exporter *BaseHuaweiCloudExporter) Describe(ch chan<- *prometheus.Desc)
Describe simply sends the two Descs in the struct to the channel.
type CloudAuth ¶
type CloudAuth struct { ProjectName string `yaml:"project_name"` ProjectID string `yaml:"project_id"` DomainName string `yaml:"domain_name"` AccessKey string `yaml:"access_key"` Region string `yaml:"region"` SecretKey string `yaml:"secret_key"` AuthURL string `yaml:"auth_url"` UserName string `yaml:"user_name"` Password string `yaml:"password"` }
type CloudConfig ¶
func NewCloudConfigFromFile ¶
func NewCloudConfigFromFile(file string) (*CloudConfig, error)
type Config ¶
type Config struct { AccessKey string SecretKey string DomainID string DomainName string EndpointType string IdentityEndpoint string Insecure bool Password string Region string TenantID string TenantName string Token string Username string UserID string HwClient *golangsdk.ProviderClient }
func InitConfig ¶
func InitConfig(config *CloudConfig) (*Config, error)
Click to show internal directories.
Click to hide internal directories.