discovery

package
v0.0.0-...-95388de Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBcsModuleLabelKey = "bcs_module"
	DiscoveryFileName        = "_sd_config.json"
)
View Source
const (
	CadvisorModule   = "cadvisor"
	NodeexportModule = "node_export"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery interface {
	//start
	Start() error

	// GetDiscoveryKey
	GetDiscoveryKey() string

	// get prometheus service discovery config
	GetPrometheusSdConfig() ([]*types.PrometheusSdConfig, error)

	// get prometheus sd config file path
	GetPromSdConfigFile() string

	//register event handle function
	RegisterEventFunc(handleFunc EventHandleFunc)
}

func NewBcsMesosDiscovery

func NewBcsMesosDiscovery(zkAddr string, promFilePrefix string, module string) (Discovery, error)

new bcs mesos module service discovery

func NewBcsServiceDiscovery

func NewBcsServiceDiscovery(zkAddr string, promFilePrefix string, module string) (Discovery, error)

new bcs service module service discovery

func NewNodeDiscovery

func NewNodeDiscovery(zkAddr []string, promFilePrefix, module string, cadvisorPort, nodeExportPort int) (Discovery, error)

new nodeDiscovery for discovery node cadvisor targets

type EventHandleFunc

type EventHandleFunc func(discoveryKey string)

Jump to

Keyboard shortcuts

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