Documentation ¶
Index ¶
- Constants
- type Discovery
- func NewBcsDiscovery(zkAddr string, promFilePrefix string, module []string) (Discovery, error)
- func NewNodeEtcdDiscovery(kubeconfig string, promFilePrefix, module string, ...) (Discovery, error)
- func NewNodeZkDiscovery(zkAddr []string, promFilePrefix, module string, ...) (Discovery, error)
- func NewServiceMonitor(kubeconfig string, promFilePrefix, module string) (Discovery, error)
- type EventHandleFunc
- type Info
Constants ¶
View Source
const ( // DefaultBcsModuleLabelKey label key DefaultBcsModuleLabelKey = "bcs_module" // DiscoveryFileName promethus file name DiscoveryFileName = "_sd_config.json" )
View Source
const ( // CadvisorModule name CadvisorModule = "cadvisor" // NodeexportModule name NodeexportModule = "node_export" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery interface { Start() error // GetPrometheusSdConfig get prometheus service discovery config GetPrometheusSdConfig(module string) ([]*types.PrometheusSdConfig, error) // GetPromSdConfigFile get prometheus sd config file path GetPromSdConfigFile(module string) string // RegisterEventFunc register event handle function RegisterEventFunc(handleFunc EventHandleFunc) }
Discovery interface for prometheus discovery
func NewBcsDiscovery ¶
NewBcsDiscovery new bcs module service discovery
func NewNodeEtcdDiscovery ¶
func NewNodeEtcdDiscovery(kubeconfig string, promFilePrefix, module string, cadvisorPort, nodeExportPort int) (Discovery, error)
NewNodeEtcdDiscovery new nodeEtcdDiscovery for discovery node cadvisor targets
type EventHandleFunc ¶
type EventHandleFunc func(dInfo Info)
EventHandleFunc event handler for callback
type Info ¶
type Info struct { // mesosModules: commtypes.BCS_MODULE_SCHEDULER, commtypes.BCS_MODULE_MESOSDATAWATCH ... // serviceModules: commtypes.BCS_MODULE_APISERVER, commtypes.BCS_MODULE_STORAGE, commtypes.BCS_MODULE_NETSERVICE ... // nodeModules: discovery.CadvisorModule, discovery.NodeexportModule // serviceMonitor: ServiceMonitor Module string // changed key Key string }
Info information
Click to show internal directories.
Click to hide internal directories.