Documentation ¶
Index ¶
- Variables
- func FindOptionWithPrefix(options []string, prefix string) string
- func OrderedKeys(m map[string]string) []string
- func RemoveOptionsWithPrefix(options []string, prefixList ...string) []string
- func Run(registry *RuleRegistry, settingsLoader RuleParamsLoader)
- type ApolloLoader
- type ChainedLoader
- type DirectMemRule
- type EnvLoader
- type GcLogRule
- type GcRule
- type LiteralJavaOptionsRule
- type MaxMetaSpaceRule
- type ModExportsRule
- type NmtRule
- type PredefinedSystemPropertiesRule
- type RemoteDebugRule
- type Rule
- type RuleParams
- type RuleParamsLoader
- type RuleRegistry
- type WithStaticDefaultsLoader
- type XmxRule
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NOTE: "jstart" in prefix improves logging recognizability DEBUG = log.New(getDebugLoggerWriter(), "DEBUG jstart ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile) INFO = log.New(os.Stderr, "INFO jstart ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile) WARN = log.New(os.Stderr, "WARN jstart ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile) ERROR = log.New(os.Stderr, "ERROR jstart ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile) )
View Source
var (
// UnlimitedMemorySize defines the bytes size when memory limit is not set (2 ^ 63 - 4096)
UnlimitedMemorySize = "9223372036854771712"
)
Functions ¶
func FindOptionWithPrefix ¶
func OrderedKeys ¶
NOTE: this hack avoids random iterate order on golang maps
func RemoveOptionsWithPrefix ¶
func Run ¶
func Run(registry *RuleRegistry, settingsLoader RuleParamsLoader)
Types ¶
type ApolloLoader ¶
type ApolloLoader struct { ApolloUrl string // apollo's api endpoint ApolloAppId string // apollo app id PropertyNames []string // property names to search for rule parameters, the first one with non-empty value will be effective. }
* apollo(https://github.com/apolloconfig/apollo) is a configuration management system. This loader load rule parameters from the application namespace of a given apollo app id.
rule parameters are encoded with format '<key>=<value>;<key>=<value>...'(e.g. 'xmx=quota-512;gc=auto;nmt=off').
func (*ApolloLoader) Load ¶
func (a *ApolloLoader) Load() RuleParams
* load rule parameters from apollo configuration management system.
homepage of apollo: https://github.com/apolloconfig/apollo
type ChainedLoader ¶
type ChainedLoader struct {
// contains filtered or unexported fields
}
func NewChainedLoader ¶
func NewChainedLoader(loader RuleParamsLoader, others ...RuleParamsLoader) *ChainedLoader
func (*ChainedLoader) Load ¶
func (l *ChainedLoader) Load() RuleParams
type DirectMemRule ¶
type DirectMemRule struct{}
func (*DirectMemRule) ConvertOptions ¶
func (d *DirectMemRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*DirectMemRule) Name ¶
func (d *DirectMemRule) Name() string
type EnvLoader ¶
type EnvLoader struct{}
func (*EnvLoader) Load ¶
func (e *EnvLoader) Load() RuleParams
type LiteralJavaOptionsRule ¶
type LiteralJavaOptionsRule struct{}
func (*LiteralJavaOptionsRule) ConvertOptions ¶
func (r *LiteralJavaOptionsRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*LiteralJavaOptionsRule) Name ¶
func (r *LiteralJavaOptionsRule) Name() string
type MaxMetaSpaceRule ¶
type MaxMetaSpaceRule struct{}
a jstart rule for setting -XX:MaxMetaspaceSize
func (*MaxMetaSpaceRule) ConvertOptions ¶
func (m *MaxMetaSpaceRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*MaxMetaSpaceRule) Name ¶
func (m *MaxMetaSpaceRule) Name() string
type ModExportsRule ¶
type ModExportsRule struct{}
func (*ModExportsRule) ConvertOptions ¶
func (r *ModExportsRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*ModExportsRule) Name ¶
func (r *ModExportsRule) Name() string
type PredefinedSystemPropertiesRule ¶
type PredefinedSystemPropertiesRule struct {
// contains filtered or unexported fields
}
func CreatePredefinedSystemPropertiesRule ¶
func CreatePredefinedSystemPropertiesRule(name string, properties map[string]string) *PredefinedSystemPropertiesRule
func (*PredefinedSystemPropertiesRule) ConvertOptions ¶
func (r *PredefinedSystemPropertiesRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*PredefinedSystemPropertiesRule) Name ¶
func (r *PredefinedSystemPropertiesRule) Name() string
type RemoteDebugRule ¶
type RemoteDebugRule struct{}
func (*RemoteDebugRule) ConvertOptions ¶
func (*RemoteDebugRule) ConvertOptions(jdkVersion string, originalOptions []string, ruleParam string) []string
func (*RemoteDebugRule) Name ¶
func (*RemoteDebugRule) Name() string
type RuleParams ¶
RuleParams is a map of rule name to rule settings.
type RuleParamsLoader ¶
type RuleParamsLoader interface {
Load() RuleParams
}
func AppendDefaults ¶
func AppendDefaults(loader RuleParamsLoader, defaults RuleParams) RuleParamsLoader
type RuleRegistry ¶
type RuleRegistry struct {
// contains filtered or unexported fields
}
func NewRuleRegistry ¶
func NewRuleRegistry() *RuleRegistry
func (*RuleRegistry) Register ¶
func (r *RuleRegistry) Register(rule Rule)
type WithStaticDefaultsLoader ¶
type WithStaticDefaultsLoader struct {
// contains filtered or unexported fields
}
func (*WithStaticDefaultsLoader) Load ¶
func (l *WithStaticDefaultsLoader) Load() RuleParams
type XmxRule ¶
type XmxRule struct { }
a jstart rule for setting Xmx by multiple total memory limit with specific ratio
func (*XmxRule) ConvertOptions ¶
Click to show internal directories.
Click to hide internal directories.