Documentation ¶
Index ¶
- Constants
- type Config
- type Metrics
- type Sokar
- func (sk *Sokar) IsHealthy() error
- func (sk *Sokar) Join()
- func (sk *Sokar) ScaleByPercentage(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (sk *Sokar) ScaleByValue(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (sk *Sokar) Start()
- func (sk *Sokar) Stop() error
- func (sk *Sokar) String() string
Constants ¶
View Source
const ( // PathHealth is the url path for health end-point PathHealth = "/health" // PathMetrics path for the metrics end-point PathMetrics = "/metrics" // PathAlertmanager path for receiving alerts from the alertmanager PathAlertmanager = "/api/alerts" // PathScaleByPercentage is the scale-by end-point that allows scaling by percentage PathScaleByPercentage = "/api/scale-by/p" + "/:" + PathPartValue // PathScaleByValue is the scale-by end-point that allows scaling by value PathScaleByValue = "/api/scale-by/v" + "/:" + PathPartValue // PathPartValue represents a path part that takes a value PathPartValue = "value" // PathBuildInfo specifies the path where to get the build information about sokar PathBuildInfo = "/api/build" // PathConfig specifies the path where to get the config information used by sokar PathConfig = "/api/config" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config cfg for sokar
func (*Config) New ¶
func (cfg *Config) New(scaleEventEmitter sokarIF.ScaleEventEmitter, capacityPlanner sokarIF.CapacityPlanner, scaler sokarIF.Scaler, schedule sokarIF.ScaleSchedule, metrics Metrics) (*Sokar, error)
New creates a new instance of sokar
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics represents the collection of metrics internally set by sokar.
func NewMetrics ¶
func NewMetrics() Metrics
NewMetrics returns the metrics collection needed for the SAA.
type Sokar ¶
type Sokar struct {
// contains filtered or unexported fields
}
Sokar component that can be used to scale scaling-objects (jobs /instances).
func (*Sokar) ScaleByPercentage ¶
func (sk *Sokar) ScaleByPercentage(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ScaleByPercentage is the end-point for receiving scale-by events. These are events for a relative scaling of the scaling-object. In this case the scaling is made basend on the given percentage value
func (*Sokar) ScaleByValue ¶
func (sk *Sokar) ScaleByValue(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
ScaleByValue is the end-point for receiving scale-by events. These are events for a relative scaling of the scaling-object. In this case the scaling is made basend on the given value.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.