prometheussd

package
v1.13.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseQueryParams

func ParseQueryParams(req *restful.Request) map[string]string

ParseQueryParams 解析并获取HTTP的query params

Types

type PrometheusServer

type PrometheusServer struct {
	// contains filtered or unexported fields
}

PrometheusServer HTTP API服务器

func (*PrometheusServer) GetPort

func (h *PrometheusServer) GetPort() uint32

GetPort 获取端口

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服务器

func (*PrometheusServer) Restart

func (h *PrometheusServer) Restart(option map[string]interface{}, api map[string]apiserver.APIConfig,
	errCh chan error) error

Restart restart server

func (*PrometheusServer) Run

func (h *PrometheusServer) Run(errCh chan error)

Run 启动HTTP API服务器

func (*PrometheusServer) Stop

func (h *PrometheusServer) Stop()

Stop shutdown server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL