Documentation ¶
Index ¶
- func ParseQueryParams(req *restful.Request) map[string]string
- type PrometheusServer
- func (h *PrometheusServer) GetPort() uint32
- func (h *PrometheusServer) GetPrometheusClients(req *restful.Request, rsp *restful.Response)
- func (h *PrometheusServer) GetPrometheusDiscoveryServer(include []string) (*restful.WebService, error)
- func (h *PrometheusServer) GetProtocol() string
- func (h *PrometheusServer) Initialize(_ context.Context, option map[string]interface{}, ...) error
- func (h *PrometheusServer) Restart(option map[string]interface{}, api map[string]apiserver.APIConfig, ...) error
- func (h *PrometheusServer) Run(errCh chan error)
- func (h *PrometheusServer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseQueryParams ¶
ParseQueryParams 解析并获取HTTP的query params
Types ¶
type PrometheusServer ¶
type PrometheusServer struct {
// contains filtered or unexported fields
}
PrometheusServer HTTP API服务器
func (*PrometheusServer) GetPrometheusClients ¶
func (h *PrometheusServer) GetPrometheusClients(req *restful.Request, rsp *restful.Response)
GetPrometheusClients 对接 prometheus 基于 http 的 service discovery [
{ "targets": [ "<host>", ... ], "labels": { "<labelname>": "<labelvalue>", ... } }, ...
]
func (*PrometheusServer) GetPrometheusDiscoveryServer ¶
func (h *PrometheusServer) GetPrometheusDiscoveryServer(include []string) (*restful.WebService, error)
GetPrometheusDiscoveryServer 注册用于prometheus服务发现的接口
func (*PrometheusServer) GetProtocol ¶
func (h *PrometheusServer) GetProtocol() string
GetProtocol 获取Server的协议
func (*PrometheusServer) Initialize ¶
func (h *PrometheusServer) Initialize(_ context.Context, option map[string]interface{}, api map[string]apiserver.APIConfig) error
Initialize 初始化HTTP API服务器
Click to show internal directories.
Click to hide internal directories.