Documentation ¶
Index ¶
- type DashboardConfig
- func (c *DashboardConfig) Config() ([]byte, error)
- func (c *DashboardConfig) ConfigToFile(file string) error
- func (c *DashboardConfig) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *DashboardConfig) DashboardToFile(file string, tplFile string) error
- func (c *DashboardConfig) ReadDashboardsDir() ([]fs.DirEntry, error)
- type DatasourceConfig
- type GrafanaConfig
- func (c *GrafanaConfig) Config() ([]byte, error)
- func (c *GrafanaConfig) ConfigToFile(file string) error
- func (c *GrafanaConfig) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *GrafanaConfig) WithAnonymousenable(anonymousEnable bool) *GrafanaConfig
- func (c *GrafanaConfig) WithDefaultTheme(defaultTheme string) *GrafanaConfig
- func (c *GrafanaConfig) WithDomain(domain string) *GrafanaConfig
- func (c *GrafanaConfig) WithOrgName(orgName string) *GrafanaConfig
- func (c *GrafanaConfig) WithOrgRole(orgRole string) *GrafanaConfig
- func (c *GrafanaConfig) WithPassword(passwd string) *GrafanaConfig
- func (c *GrafanaConfig) WithPort(port uint64) *GrafanaConfig
- func (c *GrafanaConfig) WithRootURL(rootURL string) *GrafanaConfig
- func (c *GrafanaConfig) WithUsername(user string) *GrafanaConfig
- type TsMonitorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DashboardConfig ¶
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
func (*DashboardConfig) DashboardToFile ¶
func (c *DashboardConfig) DashboardToFile(file string, tplFile string) error
DashboardToFile writes config content to specific path
func (*DashboardConfig) ReadDashboardsDir ¶
func (c *DashboardConfig) ReadDashboardsDir() ([]fs.DirEntry, error)
ReadDashboardsDir reads config content to specific path
type DatasourceConfig ¶
DatasourceConfig represent the data to generate Datasource config
func (*DatasourceConfig) ConfigToFile ¶
func (c *DatasourceConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
type GrafanaConfig ¶
type GrafanaConfig struct { DeployDir string IP string Port uint64 Username string // admin_user Password string // admin_password AnonymousEnable bool // anonymous enable RootURL string // root_url Domain string // domain DefaultTheme string // default_theme OrgName string // org_name OrgRole string // org_role }
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) WithAnonymousenable ¶
func (c *GrafanaConfig) WithAnonymousenable(anonymousEnable bool) *GrafanaConfig
WithAnonymousenable sets anonymousEnable of anonymousEnable
func (*GrafanaConfig) WithDefaultTheme ¶
func (c *GrafanaConfig) WithDefaultTheme(defaultTheme string) *GrafanaConfig
WithDefaultTheme sets defaultTheme of default theme
func (*GrafanaConfig) WithDomain ¶
func (c *GrafanaConfig) WithDomain(domain string) *GrafanaConfig
WithDomain sets domain of server domain
func (*GrafanaConfig) WithOrgName ¶
func (c *GrafanaConfig) WithOrgName(orgName string) *GrafanaConfig
WithOrgName sets orgName of org name
func (*GrafanaConfig) WithOrgRole ¶
func (c *GrafanaConfig) WithOrgRole(orgRole string) *GrafanaConfig
WithOrgRole sets orgName of org role
func (*GrafanaConfig) WithPassword ¶
func (c *GrafanaConfig) WithPassword(passwd string) *GrafanaConfig
WithPassword sets password of admin user
func (*GrafanaConfig) WithPort ¶
func (c *GrafanaConfig) WithPort(port uint64) *GrafanaConfig
WithPort set Port field of GrafanaConfig
func (*GrafanaConfig) WithRootURL ¶
func (c *GrafanaConfig) WithRootURL(rootURL string) *GrafanaConfig
WithRootURL sets rootURL of root url
func (*GrafanaConfig) WithUsername ¶
func (c *GrafanaConfig) WithUsername(user string) *GrafanaConfig
WithUsername sets username of admin user
type TsMonitorConfig ¶
type TsMonitorConfig struct { Host string MetricPath string ErrorLogPath string DataPath string WALPath string ProcessName string MonitorAddr string MonitorDB string TLSEnabled bool LoggingPath string }
TsMonitorConfig represent the data to generate ts-monitor config
func (*TsMonitorConfig) Config ¶
func (c *TsMonitorConfig) Config() ([]byte, error)
Config generate the config file data.
func (*TsMonitorConfig) ConfigToFile ¶
func (c *TsMonitorConfig) ConfigToFile(file string) error
ConfigToFile write config content to specific path
func (*TsMonitorConfig) ConfigWithTemplate ¶
func (c *TsMonitorConfig) ConfigWithTemplate(tpl string) ([]byte, error)
ConfigWithTemplate generate the AlertManager config content by tpl