Documentation
¶
Index ¶
- Variables
- func AssembleRequest(processes []*os.Process, coreIds []string, maxCache, minCache int, ...) map[string]interface{}
- func CleanupProcess(p *os.Process)
- func CleanupProcesses(ps []*os.Process)
- func ConfigInit(path string) error
- func CreateNewProcess(cmd string) (*os.Process, error)
- func CreateNewProcesses(cmd string, number int) ([]*os.Process, error)
- func FormatByKey(f string, m map[string]interface{}) (string, error)
- func GetClientAuthType() string
- func GetConfigAddr() string
- func GetConfigDebugPort() int
- func GetConfigOption(key string, rawVal interface{}) error
- func GetConfigOptions(rawVal interface{}) error
- func GetConfigTLSPort() int
- func GetHTTPSV1URL() string
- func GetHTTPV1URL() string
- func GetPolicyPath() string
Constants ¶
This section is empty.
Variables ¶
View Source
var BoolSchema = `{
"type": "boolean"
}`
BoolSchema schema
View Source
var NonNegativeInteger = `{
"type": ["integer", "string"],
"pattern": "^[0-9]*$", "minimum": 0
}`
NonNegativeInteger schema
View Source
var PositiveInteger = `{
"type": ["integer", "string"],
"pattern": "^[0-9]*$", "minimum": 1
}`
PositiveInteger schema
Functions ¶
func AssembleRequest ¶
func AssembleRequest(processes []*os.Process, coreIds []string, maxCache, minCache int, mbaPercentage int, policy string) map[string]interface{}
AssembleRequest assemble the request body by given process id and max, min cache or policy
func CreateNewProcess ¶
CreateNewProcess Create a new background running process by command string e.g. CreateNewprocess("sleep 1000")
func CreateNewProcesses ¶
CreateNewProcesses To create some processes
func FormatByKey ¶
FormatByKey usage:
m := map[string]interface{}{"name": "John", "age": 47} s := "Hi {{.name}}. Your age is {{.age}}\n" result, err := FormatByKey(s, m)
use go native template. If you do not like go template, you can use mustache
import "github.com/hoisie/mustache" m := map[string]interface{}{"name": "John", "age": 47} s := "Hi {{name}}. Your age is {{age}}\n" result := mustache.Render("hello {{c}}, {{age}}", m)
func GetClientAuthType ¶
func GetClientAuthType() string
GetClientAuthType getter for client auth type
func GetConfigOption ¶
GetConfigOption is just simple wraper for config UnmarshalKey
func GetConfigOptions ¶
func GetConfigOptions(rawVal interface{}) error
GetConfigOptions is just simple wraper for config Unmarshal
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.