options

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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

func (opts *Options) AllowMetric(metricName string) bool

AllowMetric returns whether a certain Metric should be allowed or not.

Jump to

Keyboard shortcuts

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