resource

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 2 Imported by: 4,073

Documentation

Overview

Package resource provides functionality for resource, which capture identifying information about the entities for which signals are exported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource describes an entity about which identifying information and metadata is exposed.

func Merge

func Merge(a, b *Resource) *Resource

Merge creates a new resource by combining resource a and b. If there are common key between resource a and b then value from resource a is preserved. If one of the resources is nil then the other resource is returned without creating a new one.

func New

func New(kvs ...core.KeyValue) *Resource

New creates a resource from a set of attributes. If there are duplicates keys then the first value of the key is preserved.

func (Resource) Attributes

func (r Resource) Attributes() []core.KeyValue

Attributes returns a copy of attributes from the resource.

func (Resource) Equal

func (r Resource) Equal(other Resource) bool

Equal returns true if other Resource is the equal to r.

Directories

Path Synopsis
Package resourcekeys contains well known type and label keys for resources.
Package resourcekeys contains well known type and label keys for resources.

Jump to

Keyboard shortcuts

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