config

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig added in v1.0.9

func GetConfig(filename string) ([]byte, error)

GetConfig returns a raw config file from embed templates

Types

type AlertManagerConfig

type AlertManagerConfig struct{}

AlertManagerConfig represent the data to generate AlertManager config

func NewAlertManagerConfig

func NewAlertManagerConfig() *AlertManagerConfig

NewAlertManagerConfig returns a AlertManagerConfig

func (*AlertManagerConfig) Config

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

Config generate the config file data.

func (*AlertManagerConfig) ConfigToFile

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

ConfigToFile write config content to specific path

func (*AlertManagerConfig) ConfigWithTemplate

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

ConfigWithTemplate generate the AlertManager config content by tpl

type BlackboxConfig

type BlackboxConfig struct{}

BlackboxConfig represent the data to generate AlertManager config

func NewBlackboxConfig

func NewBlackboxConfig() *BlackboxConfig

NewBlackboxConfig returns a BlackboxConfig

func (*BlackboxConfig) Config

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

Config generate the config file data.

func (*BlackboxConfig) ConfigToFile

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

ConfigToFile write config content to specific path

func (*BlackboxConfig) ConfigWithTemplate

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

ConfigWithTemplate generate the AlertManager config content by tpl

type DashboardConfig

type DashboardConfig struct {
	ClusterName string
	DeployDir   string
}

DashboardConfig represent the data to generate Dashboard config

func NewDashboardConfig

func NewDashboardConfig(cluster, deployDir string) *DashboardConfig

NewDashboardConfig returns a DashboardConfig

func (*DashboardConfig) Config

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

Config generate the config file data.

func (*DashboardConfig) ConfigToFile

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

ConfigToFile write config content to specific path

func (*DashboardConfig) ConfigWithTemplate

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

ConfigWithTemplate generate the Dashboard config content by tpl

type DatasourceConfig

type DatasourceConfig struct {
	ClusterName string
	IP          string
	Port        uint64
}

DatasourceConfig represent the data to generate Datasource config

func NewDatasourceConfig

func NewDatasourceConfig(cluster, ip string) *DatasourceConfig

NewDatasourceConfig returns a DatasourceConfig

func (*DatasourceConfig) Config

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

Config generate the config file data.

func (*DatasourceConfig) ConfigToFile

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

ConfigToFile write config content to specific path

func (*DatasourceConfig) ConfigWithTemplate

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

ConfigWithTemplate generate the Datasource config content by tpl

func (*DatasourceConfig) WithPort

func (c *DatasourceConfig) WithPort(port uint64) *DatasourceConfig

WithPort set Port field of DatasourceConfig

type GrafanaConfig

type GrafanaConfig struct {
	DeployDir string
	IP        string
	Port      uint64
}

GrafanaConfig represent the data to generate Grafana config

func NewGrafanaConfig

func NewGrafanaConfig(ip, deployDir string) *GrafanaConfig

NewGrafanaConfig returns a GrafanaConfig

func (*GrafanaConfig) Config

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

Config generate the config file data.

func (*GrafanaConfig) ConfigToFile

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

ConfigToFile write config content to specific path

func (*GrafanaConfig) ConfigWithTemplate

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

ConfigWithTemplate generate the Grafana config content by tpl

func (*GrafanaConfig) WithPort

func (c *GrafanaConfig) WithPort(port uint64) *GrafanaConfig

WithPort set Port field of GrafanaConfig

type PrometheusConfig

type PrometheusConfig struct {
	ClusterName               string
	TLSEnabled                bool
	KafkaAddrs                []string
	NodeExporterAddrs         []string
	TiDBStatusAddrs           []string
	TiKVStatusAddrs           []string
	PDAddrs                   []string
	TiFlashStatusAddrs        []string
	TiFlashLearnerStatusAddrs []string
	PumpAddrs                 []string
	DrainerAddrs              []string
	CDCAddrs                  []string
	ZookeeperAddrs            []string
	BlackboxExporterAddrs     []string
	LightningAddrs            []string
	MonitoredServers          []string
	AlertmanagerAddrs         []string
	PushgatewayAddr           string
	BlackboxAddr              string
	KafkaExporterAddr         string
	GrafanaAddr               string
}

PrometheusConfig represent the data to generate Prometheus config

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) AddBlackbox

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

AddBlackbox add an blackbox address

func (*PrometheusConfig) AddBlackboxExporter

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

AddBlackboxExporter add a BlackboxExporter address

func (*PrometheusConfig) AddCDC

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

AddCDC add a cdc address

func (*PrometheusConfig) AddDrainer

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

AddDrainer add a drainer address

func (*PrometheusConfig) AddGrafana

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

AddGrafana add an kafka exporter address

func (*PrometheusConfig) AddKafka

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

AddKafka add a kafka address

func (*PrometheusConfig) AddKafkaExporter

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

AddKafkaExporter add an kafka exporter address

func (*PrometheusConfig) AddLightning

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

AddLightning add a lightning address

func (*PrometheusConfig) AddMonitoredServer

func (c *PrometheusConfig) AddMonitoredServer(ip string) *PrometheusConfig

AddMonitoredServer add a MonitoredServer address

func (*PrometheusConfig) AddNodeExpoertor

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

AddNodeExpoertor add a node expoter address

func (*PrometheusConfig) AddPD

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

AddPD add a PD address

func (*PrometheusConfig) AddPump

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

AddPump add a pump address

func (*PrometheusConfig) AddPushgateway

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

AddPushgateway add an pushgateway address

func (*PrometheusConfig) AddTiDB

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

AddTiDB add a TiDB address

func (*PrometheusConfig) AddTiFlash

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

AddTiFlash add a TiFlash address

func (*PrometheusConfig) AddTiFlashLearner

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

AddTiFlashLearner add a TiFlash learner address

func (*PrometheusConfig) AddTiKV

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

AddTiKV add a TiKV address

func (*PrometheusConfig) AddZooKeeper

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

AddZooKeeper add a zookeeper 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

type TiSparkConfig added in v1.0.9

type TiSparkConfig struct {
	TiSparkMasters string
	CustomFields   map[string]interface{}
	Endpoints      []string
}

TiSparkConfig represent the data to generate TiSpark configs

func NewTiSparkConfig added in v1.0.9

func NewTiSparkConfig(pds []string) *TiSparkConfig

NewTiSparkConfig returns a TiSparkConfig

func (*TiSparkConfig) Config added in v1.0.9

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

Config generate the config file data.

func (*TiSparkConfig) ConfigToFile added in v1.0.9

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

ConfigToFile write config content to specific path

func (*TiSparkConfig) ConfigWithTemplate added in v1.0.9

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

ConfigWithTemplate parses the template file

func (*TiSparkConfig) WithCustomFields added in v1.0.9

func (c *TiSparkConfig) WithCustomFields(m map[string]interface{}) *TiSparkConfig

WithCustomFields sets custom setting fields

func (*TiSparkConfig) WithMasters added in v1.0.9

func (c *TiSparkConfig) WithMasters(masters string) *TiSparkConfig

WithMasters sets master address

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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