descriptor

package
Version: v0.0.0-...-5253b6b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(cfg string) (dcfg *pb.GlobalConfig, ce *adapter.ConfigErrors)

Parse parses a descriptor config into its parts. This entire function is equivalent to jsonpb.Unmarshal() It provides better error reporting about which specific object has the error

func ValidateLogEntry

func ValidateLogEntry(desc *dpb.LogEntryDescriptor) (ce *adapter.ConfigErrors)

ValidateLogEntry validates a log entry descriptor.

func ValidateMetric

func ValidateMetric(desc *dpb.MetricDescriptor) (ce *adapter.ConfigErrors)

ValidateMetric validates a metric descriptor.

func ValidateMonitoredResource

func ValidateMonitoredResource(desc *dpb.MonitoredResourceDescriptor) (ce *adapter.ConfigErrors)

ValidateMonitoredResource validates a monitored resource descriptor.

func ValidatePrincipal

func ValidatePrincipal(desc *dpb.PrincipalDescriptor) (ce *adapter.ConfigErrors)

ValidatePrincipal validates a principal descriptor.

func ValidateQuota

func ValidateQuota(desc *dpb.QuotaDescriptor) (ce *adapter.ConfigErrors)

ValidateQuota validates a quota descriptor.

Types

type Finder

type Finder interface {
	expr.AttributeDescriptorFinder

	// GetLog retrieves the log descriptor named `name`
	GetLog(name string) *dpb.LogEntryDescriptor

	// GetMetric retrieves the metric descriptor named `name`
	GetMetric(name string) *dpb.MetricDescriptor

	// GetMonitoredResource retrieves the monitored resource descriptor named `name`
	GetMonitoredResource(name string) *dpb.MonitoredResourceDescriptor

	// GetPrincipal retrieves the security principal descriptor named `name`
	GetPrincipal(name string) *dpb.PrincipalDescriptor

	// GetQuota retrieves the quota descriptor named `name`
	GetQuota(name string) *dpb.QuotaDescriptor
}

Finder describes anything that can provide a view into the config's descriptors by name and type.

func NewFinder

func NewFinder(cfg *pb.GlobalConfig) Finder

NewFinder constructs a new Finder for the provided global config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL