Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
IncreaseMetricAPI IIncreaseMetric
}
Client is a metrics client.
func (*Client) IncreaseCacheHitMetric ¶
IncreaseCacheHitMetric increases the cache hit metric.
func (*Client) IncreaseCacheMissMetric ¶
IncreaseCacheMissMetric increases the cache miss metric.
type Config ¶
type Config struct { // MetricsProvider is the type of metrics to use. These are constants in the metrics package. MetricsProvider MetricsType // CustomConfiguration is a configuration for a custom metrics client. This field is required only if MetricsProvider is set to // CustomMetricsType. CustomConfiguration *CustomConfig }
Config is a configuration struct for the metrics client.
type CustomConfig ¶
type CustomConfig struct {
Client IIncreaseMetric
}
CustomConfig is a configuration struct for a custom metrics client.
type IIncreaseMetric ¶
type IIncreaseMetric interface { IncreaseCacheHitMetric(ctx context.Context, metricName string) IncreaseCacheMissMetric(ctx context.Context, metricName string) IncreaseCacheSoftHitMetric(ctx context.Context, metricName string) }
IIncreaseMetric is an interface for a basic increase metrics client.
type MetricsType ¶
type MetricsType int32
MetricsType is the type of metrics provider that Heimdall will use to emit cache hit, soft hit, miss metrics.
const ( // CustomMetricsType allows the user to BYOM (Bring your own metrics) as long as the user's metrics client fullfils the interface. CustomMetricsType MetricsType = iota + 1 )
Click to show internal directories.
Click to hide internal directories.