Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client to do prometheus API request
func (*Client) ConfigReload ¶
ConfigReload do Config reloading
func (*Client) RuntimeInfo ¶
func (c *Client) RuntimeInfo() (*RuntimeInfo, error)
RuntimeInfo return the current status of this shard, only return tManager targets if scrapingOnly is true, otherwise ,all target this cli discovered will be returned
type ConfigInfo ¶ added in v0.0.5
type ConfigInfo struct { // RawContent is the content of config file RawContent []byte // Md5 is a md5 of config file content Md5 string // Config is the marshaled prometheus config Config *config.Config }
ConfigInfo include all information of current config
type ConfigManager ¶ added in v0.0.5
type ConfigManager struct {
// contains filtered or unexported fields
}
ConfigManager do config manager
func NewConfigManager ¶ added in v0.0.5
func NewConfigManager(file string, log logrus.FieldLogger) *ConfigManager
NewConfigManager return an config manager
func (*ConfigManager) AddReloadCallbacks ¶ added in v0.0.5
func (c *ConfigManager) AddReloadCallbacks(f ...func(c *ConfigInfo) error)
AddReloadCallbacks add callbacks of config reload event
func (*ConfigManager) ConfigInfo ¶ added in v0.0.5
func (c *ConfigManager) ConfigInfo() *ConfigInfo
ConfigInfo return current config info
func (*ConfigManager) Reload ¶ added in v0.0.5
func (c *ConfigManager) Reload() error
Reload reload config from file and do all callbacks
type RuntimeInfo ¶
type RuntimeInfo struct { // TimeSeriesCount is the series the prometheus head check handled TimeSeriesCount int64 `json:"timeSeriesCount"` }
RuntimeInfo include some filed the prometheus API /api/v1/runtimeinfo returned
Click to show internal directories.
Click to hide internal directories.