Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomizeStore ¶
type CustomizeStore interface { CustomizeStoreInterface Name() string Run(stop <-chan struct{}) }
CustomizeStore describe common state interface inherent from state store
func NewCustomizeStoreManager ¶
func NewCustomizeStoreManager(cacheTTL time.Duration, config *types.OnlineConfig) CustomizeStore
NewCustomizeStoreManager new a customize store manager instance
type CustomizeStoreInterface ¶
type CustomizeStoreInterface interface { GetCustomizeResourceRecentState(jobName, metricName string) (*Metric, error) GetCustomizeResourceRangeStats(jobName, metricName string, start, end time.Time, count int) ([]*Metric, error) ListCustomizeResourceRecentState() (map[string]*Metric, error) ListCustomizeResourceRangeStats(start, end time.Time, count int) (map[string][]*Metric, error) }
CustomizeStoreInterface describe special customize state interface
type Metric ¶
type Metric struct { JobName string Values map[string]float64 `json:"values"` Ts time.Time `json:"-"` }
Metric describe online job's SLO and current metrics value
type MetricResponseList ¶
type MetricResponseList struct { JobName string `json:"job_name"` MetricName string `json:"metric_name"` Values map[string]float64 }
MetricResponseList group online job metric data
func (*MetricResponseList) MarshalJSON ¶
func (m *MetricResponseList) MarshalJSON() ([]byte, error)
MarshalJSON, json data to string
func (*MetricResponseList) UnmarshalJSON ¶
func (m *MetricResponseList) UnmarshalJSON(b []byte) error
UnmarshalJSON, string to json data
type MetricsResponseData ¶
type MetricsResponseData struct { Code int `json:"code"` Msg string `json:"msg"` Data []MetricResponseList `json:"data"` }
MetricsResponseData show online job metric response data
type StoreInterfaceForTest ¶
type StoreInterfaceForTest interface { CustomizeStoreInterface AddMetricsData(key string, now time.Time, metric Metric) }
StoreInterfaceForTest for testing
Click to show internal directories.
Click to hide internal directories.