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 // contains filtered or unexported fields }
Options encapsulates surfacer options common to all surfacers.
func BuildOptionsFromConfig ¶ added in v0.11.3
func BuildOptionsFromConfig(sdef *surfacerpb.SurfacerDef, l *logger.Logger) (*Options, error)
BuildOptionsFromConfig builds surfacer options using config.
func (*Options) AllowEventMetrics ¶ added in v0.11.3
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 ¶ added in v0.11.3
AllowMetric returns whether a certain Metric should be allowed or not.
Click to show internal directories.
Click to hide internal directories.