dm

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusConfig

type PrometheusConfig struct {
	ClusterName       string
	TLSEnabled        bool
	AlertmanagerAddrs []string
	GrafanaAddr       string

	MasterAddrs []string
	WorkerAddrs []string
}

PrometheusConfig represents the data to generate Prometheus config You may need to update the template file if change this struct.

func NewPrometheusConfig

func NewPrometheusConfig(cluster string, enableTLS bool) *PrometheusConfig

NewPrometheusConfig returns a PrometheusConfig

func (*PrometheusConfig) AddAlertmanager

func (c *PrometheusConfig) AddAlertmanager(ip string, port uint64) *PrometheusConfig

AddAlertmanager add an alertmanager address

func (*PrometheusConfig) AddGrafana

func (c *PrometheusConfig) AddGrafana(ip string, port uint64) *PrometheusConfig

AddGrafana adds an kafka exporter address

func (*PrometheusConfig) AddMasterAddrs

func (c *PrometheusConfig) AddMasterAddrs(ip string, port uint64) *PrometheusConfig

AddMasterAddrs add an dm-master address

func (*PrometheusConfig) AddWorkerAddrs

func (c *PrometheusConfig) AddWorkerAddrs(ip string, port uint64) *PrometheusConfig

AddWorkerAddrs add an dm-worker address

func (*PrometheusConfig) Config

func (c *PrometheusConfig) Config() ([]byte, error)

Config generate the config file data.

func (*PrometheusConfig) ConfigToFile

func (c *PrometheusConfig) ConfigToFile(file string) error

ConfigToFile write config content to specific path

func (*PrometheusConfig) ConfigWithTemplate

func (c *PrometheusConfig) ConfigWithTemplate(tpl string) ([]byte, error)

ConfigWithTemplate generate the Prometheus config content by tpl

Jump to

Keyboard shortcuts

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