helper

package
v0.0.0-...-edfa39e Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToOpts

func ToOpts(cfg *config.Params) (opts []gapiopts.ClientOption)

ToOpts converts the Stackdriver config params to options for configuring Stackdriver clients.

func ToStringMap

func ToStringMap(in map[string]interface{}) map[string]string

ToStringMap converts a map[string]interface{} to a map[string]string

Types

type Metadata

type Metadata struct {
	ProjectID   string
	Location    string
	ClusterName string
}

Metadata keeps metadata about the project which this stackdriver adapter is running on.

func (*Metadata) FillProjectMetadata

func (md *Metadata) FillProjectMetadata(in map[string]string)

FillProjectMetadata fills project metadata for the given map if the key matches and the value is empty.

type MetadataGenerator

type MetadataGenerator interface {
	GenerateMetadata() Metadata
}

MetadataGenerator creates metadata based on the given metadata functions.

func NewMetadataGenerator

func NewMetadataGenerator(shouldFill shouldFillFn, projectIDFn, locationFn, clusterNameFn metadataFn) MetadataGenerator

NewMetadataGenerator creates a MetadataGenerator with the given functions.

Jump to

Keyboard shortcuts

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