Documentation
¶
Overview ¶
Package options defines data structure for common surfacer options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
MetricsBufferSize int
Config *surfacerpb.SurfacerDef
Logger *logger.Logger
AddFailureMetric bool
AdditionalLabels [][2]string
// contains filtered or unexported fields
}
Options encapsulates surfacer options common to all surfacers.
func BuildOptionsForTest ¶
func BuildOptionsForTest(sdef *surfacerpb.SurfacerDef) *Options
BuildOptionsForTest builds surfacer options using config for tests.
func BuildOptionsFromConfig ¶
func BuildOptionsFromConfig(sdef *surfacerpb.SurfacerDef, l *logger.Logger) (*Options, error)
BuildOptionsFromConfig builds surfacer options using config.
func (*Options) AllowEventMetrics ¶
func (opts *Options) AllowEventMetrics(em *metrics.EventMetrics) bool
AllowEventMetrics returns whether a certain EventMetrics should be allowed or not. TODO(manugarg): Explore if we can either log or increment some metric when we ignore an EventMetrics.
func (*Options) AllowMetric ¶
AllowMetric returns whether a certain Metric should be allowed or not.
func (*Options) IgnoreMetric ¶
func (*Options) IsLatencyMetric ¶
Click to show internal directories.
Click to hide internal directories.