cache

package
v0.0.0-...-51fd5d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func New

func New() (cache *Cache, err error)

New returns a prepared Cache struct.

func (*Cache) Close

func (c *Cache) Close()

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) (b []byte, err error)

func (*Cache) GetAlarmCategoriesSimplified

func (c *Cache) GetAlarmCategoriesSimplified(ctx context.Context, ids []int32) (categories []models.AlarmCategorySimplified, err error)

func (*Cache) GetAlarmCategorySimplified

func (c *Cache) GetAlarmCategorySimplified(ctx context.Context, id int32) (exists bool, category models.AlarmCategorySimplified, err error)

func (*Cache) GetContainerAlarmRecognition

func (c *Cache) GetContainerAlarmRecognition(ctx context.Context, id int32) (r GetContainerRecognitionResponse, err error)

func (*Cache) GetCustomQuerySimplified

func (c *Cache) GetCustomQuerySimplified(ctx context.Context, id int32) (r GetCustomQueryResponse, err error)

func (*Cache) GetDashboardAlarmRecognition

func (c *Cache) GetDashboardAlarmRecognition(ctx context.Context, id int32) (r GetDashboardRecogntionResponse, err error)

func (*Cache) GetFlexLegacyMetricDetails

func (c *Cache) GetFlexLegacyMetricDetails(ctx context.Context, id int64, out any) (exists bool, err error)

func (*Cache) GetMetricAddDataForm

func (c *Cache) GetMetricAddDataForm(ctx context.Context, refkey string) (r GetMetricAddDataFormResponse, err error)

func (*Cache) GetMetricAlarmExpressions

func (c *Cache) GetMetricAlarmExpressions(ctx context.Context, metricId int64) (r GetMetricAlarmExpressionsResponse, err error)

func (*Cache) GetMetricDataPolicyId

func (c *Cache) GetMetricDataPolicyId(ctx context.Context, metricId int64) (r GetMetricDataPolicyIdResponse, err error)

func (*Cache) GetMetricEvExpression

func (c *Cache) GetMetricEvExpression(ctx context.Context, metricId int64) (r GetMetricEvExpressionResponse, err error)

func (*Cache) GetMetricRequest

func (c *Cache) GetMetricRequest(ctx context.Context, id int64) (r GetMetricRequestResponse, err error)

func (*Cache) GetMetricsAlarmExpressions

func (c *Cache) GetMetricsAlarmExpressions(ctx context.Context, metricsIds []int64) (expressions []GetMetricAlarmExpressionsResponse, err error)

func (*Cache) GetRTSMetricConfig

func (c *Cache) GetRTSMetricConfig(ctx context.Context, metricId int64) (r GetRTSMetricConfigResponse, err error)

func (*Cache) GetSNMPAgent

func (c *Cache) GetSNMPAgent(ctx context.Context, containerId int32) (r GetGoSNMPConfigResponse, err error)

func (*Cache) GetSNMPMetrics

func (c *Cache) GetSNMPMetrics(ctx context.Context, ids []int64) (r []GetSNMPMetricResponse, err error)

func (*Cache) GetServerCostResult

func (c *Cache) GetServerCostResult(ctx context.Context) (r ServerCostResultResponse, err error)

func (*Cache) GetUserLimited

func (c *Cache) GetUserLimited(ctx context.Context, ip string, route string) (suspended bool, err error)

func (*Cache) Set

func (c *Cache) Set(ctx context.Context, b []byte, key string, exp time.Duration) error

func (*Cache) SetAlarmCategoriesSimplified

func (c *Cache) SetAlarmCategoriesSimplified(ctx context.Context, categories []models.AlarmCategorySimplified) (err error)

func (*Cache) SetAlarmCategorySimplified

func (c *Cache) SetAlarmCategorySimplified(ctx context.Context, category models.AlarmCategorySimplified) (err error)

func (*Cache) SetContainerRecognition

func (c *Cache) SetContainerRecognition(ctx context.Context, id int32, recognition alarm.Recognition) error

func (*Cache) SetCustomQuerySimplified

func (c *Cache) SetCustomQuerySimplified(ctx context.Context, cq models.CustomQuerySimplified, id int32) error

func (*Cache) SetDashboardAlarmRecognition

func (c *Cache) SetDashboardAlarmRecognition(ctx context.Context, id int32, recognition alarm.Recognition) error

func (*Cache) SetFlexLegacyMetricDetails

func (c *Cache) SetFlexLegacyMetricDetails(ctx context.Context, id int64, details []byte) (err error)

func (*Cache) SetMetricAddDataForm

func (c *Cache) SetMetricAddDataForm(ctx context.Context, refkey string, form models.BasicMetricAddDataForm) (err error)

func (*Cache) SetMetricAlarmExpressions

func (c *Cache) SetMetricAlarmExpressions(ctx context.Context, metricId int64, exp []models.AlarmExpressionSimplified) (err error)

func (*Cache) SetMetricDataPolicyId

func (c *Cache) SetMetricDataPolicyId(ctx context.Context, metricId int64, dataPolicyId int16) (err error)

func (*Cache) SetMetricEvExpression

func (c *Cache) SetMetricEvExpression(ctx context.Context, metricId int64, expression string) (err error)

func (*Cache) SetMetricRequest

func (c *Cache) SetMetricRequest(ctx context.Context, id int64, request models.MetricRequest) (err error)

func (*Cache) SetMetricsAlarmExpressions

func (c *Cache) SetMetricsAlarmExpressions(ctx context.Context, metricIds []int64, exp [][]models.AlarmExpressionSimplified) (err error)

func (*Cache) SetRTSMetricConfig

func (c *Cache) SetRTSMetricConfig(ctx context.Context, metricId int64, config models.RTSMetricConfig) (err error)

func (*Cache) SetSNMPAgent

func (c *Cache) SetSNMPAgent(ctx context.Context, containerId int32, agent models.SNMPv2cAgent) (err error)

func (*Cache) SetSNMPMetrics

func (c *Cache) SetSNMPMetrics(ctx context.Context, metrics []models.SNMPMetric) (err error)

func (*Cache) SetServerCostResult

func (c *Cache) SetServerCostResult(ctx context.Context, result models.ServerCostResult) (err error)

func (*Cache) SetUserLimited

func (c *Cache) SetUserLimited(ctx context.Context, ip string, route string, duration time.Duration) (err error)

type GetContainerRecognitionResponse

type GetContainerRecognitionResponse struct {
	Exists      bool
	Recognition alarm.Recognition
}

type GetCustomQueryResponse

type GetCustomQueryResponse struct {
	Exists      bool
	CustomQuery models.CustomQuerySimplified
}

type GetDashboardRecogntionResponse

type GetDashboardRecogntionResponse struct {
	Exists      bool
	Recognition alarm.Recognition
}

type GetGoSNMPConfigResponse

type GetGoSNMPConfigResponse struct {
	// Exists is the config existence.
	Exists bool
	// Agent is the snmp agent.
	Agent models.SNMPv2cAgent
}

GetGoSNMPConfigResponse is the response for the GetGoSNMPConfig handler.

type GetMetricAddDataFormResponse

type GetMetricAddDataFormResponse struct {
	// Exists is the cache existence.
	Exists bool
	// Form is the base metric add data form.
	Form models.BasicMetricAddDataForm
}

type GetMetricAlarmExpressionsResponse

type GetMetricAlarmExpressionsResponse struct {
	// Exists is the cache existence.
	Exists bool
	// AlarmExpressions is the alarm expressions.
	AlarmExpressions []models.AlarmExpressionSimplified
}

type GetMetricDataPolicyIdResponse

type GetMetricDataPolicyIdResponse struct {
	// Exists is the cache existence.
	Exists bool
	// DataPolicyId is the data policy id.
	DataPolicyId int16
}

type GetMetricEvExpressionResponse

type GetMetricEvExpressionResponse struct {
	// Exists is the cache existence.
	Exists bool
	// Expression is the metric evaluate expression.
	Expression string
}

type GetMetricRequestResponse

type GetMetricRequestResponse struct {
	// Exists is the cache existence.
	Exists bool
	// Request is the metric request.
	Request models.MetricRequest
}

type GetRTSMetricConfigResponse

type GetRTSMetricConfigResponse struct {
	// Exists is the cache existence.
	Exists bool
	// Config is the real time service metric configuration.
	Config models.RTSMetricConfig
}

type GetSNMPMetricResponse

type GetSNMPMetricResponse struct {
	// Exists is the config existence.
	Exists bool
	// Metric is the snmp metric.
	Metric models.SNMPMetric
}

GetSNMPMetricResponse is the response for the GetSNMPMetric handler.

type ServerCostResultResponse

type ServerCostResultResponse struct {
	Exists bool
	Result models.ServerCostResult
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL