Documentation ¶
Overview ¶
Package keygen is a sample workload for our demo server. As a sample time consuming work load, this package generates RSA private/public key pairs.
See the Config struct for a set of parameters for this workload.
Index ¶
- type Config
- type History
- type KeyGen
- func (kg *KeyGen) APIGet(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (kg *KeyGen) APIPut(w http.ResponseWriter, r *http.Request, params httprouter.Params)
- func (kg *KeyGen) AddRoutes(router *httprouter.Router, base string)
- func (kg *KeyGen) BindConfig(v *viper.Viper, fs *pflag.FlagSet)
- func (kg *KeyGen) LoadConfig(c Config)
- func (kg *KeyGen) Restart()
- func (kg *KeyGen) WorkloadOutput(s string)
- type KeyGenStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enable bool `json:"enable"` // This limits the amount of work to do. The workload will stop when either // of these is complete. Zero is interpreted as "infinity". TimeToRun is in // seconds. NumToGen int `json:"numToGen" mapstructure:"num-to-gen"` TimeToRun int `json:"timeToRun" mapstructure:"time-to-run"` // If both of these variables are set, then the keygen worker will pull work // items off of the MemQ. If there is an error it will keep retrying with a // small pause. If the queue is empty, and exitOnComplete is set, then the // process will exit. If MemQ is used, then NumToGen and TimeToRun are // ignored. MemQServer string `json:"memQServer" mapstructure:"memq-server"` MemQQueue string `json:"memQQueue" mapstructure:"memq-queue"` // What should happen when the workload is complete? ExitOnComplete bool `json:"exitOnComplete" mapstructure:"exit-on-complete"` ExitCode int `json:"exitCode" mapstructure:"exit-code"` }
Config is the input parameters to the keygen workload.
type KeyGen ¶
type KeyGen struct {
// contains filtered or unexported fields
}
func (*KeyGen) APIGet ¶
func (kg *KeyGen) APIGet(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*KeyGen) APIPut ¶
func (kg *KeyGen) APIPut(w http.ResponseWriter, r *http.Request, params httprouter.Params)
func (*KeyGen) LoadConfig ¶
func (*KeyGen) WorkloadOutput ¶
type KeyGenStatus ¶
ProbeStatus is returned from a GET to this API endpoing
Click to show internal directories.
Click to hide internal directories.