Documentation
¶
Index ¶
- type Config
- func (c *Config) Config() ([]byte, error)
- func (c *Config) ConfigToFile(file string) error
- func (c *Config) ConfigWithTemplate(tpl string) ([]byte, error)
- func (c *Config) WithCPUQuota(cpu string) *Config
- func (c *Config) WithIOReadBandwidthMax(io string) *Config
- func (c *Config) WithIOWriteBandwidthMax(io string) *Config
- func (c *Config) WithLimitCORE(core string) *Config
- func (c *Config) WithMemoryLimit(mem string) *Config
- type TiSparkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServiceName string User string MemoryLimit string CPUQuota string IOReadBandwidthMax string IOWriteBandwidthMax string LimitCORE string DeployDir string DisableSendSigkill bool // Takes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always. // The Template set as always if this is not setted. Restart string }
Config represent the data to generate systemd config
func (*Config) ConfigToFile ¶
ConfigToFile write config content to specific path
func (*Config) ConfigWithTemplate ¶
ConfigWithTemplate generate the system config content by tpl
func (*Config) WithCPUQuota ¶
WithCPUQuota set the CPUQuota field of Config
func (*Config) WithIOReadBandwidthMax ¶
WithIOReadBandwidthMax set the IOReadBandwidthMax field of Config
func (*Config) WithIOWriteBandwidthMax ¶
WithIOWriteBandwidthMax set the IOWriteBandwidthMax field of Config
func (*Config) WithLimitCORE ¶ added in v1.2.0
WithLimitCORE set the LimitCORE field of Config
func (*Config) WithMemoryLimit ¶
WithMemoryLimit set the MemoryLimit field of Config
type TiSparkConfig ¶ added in v1.0.9
type TiSparkConfig struct { ServiceName string User string DeployDir string JavaHome string // Takes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always. // The Template set as always if this is not setted. Restart string }
TiSparkConfig represent the data to generate systemd config
func NewTiSparkConfig ¶ added in v1.0.9
func NewTiSparkConfig(service, user, deployDir, javaHome string) *TiSparkConfig
NewTiSparkConfig returns a Config with given arguments
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 generate the system config content by tpl