gcp

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

gcp

Package setting up communication with our most used Google Services. Allows for easier integration with Google Services.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustInitTracerProvider added in v0.0.41

func MustInitTracerProvider(project string, opts ...sdktrace.TracerProviderOption) *sdktrace.TracerProvider

func NewLoggingClient added in v0.0.7

func NewLoggingClient(project string) (*logging.Client, error)

NewLoggingClient creates a Client which also handles Errors by simply writing to Stderr

func WithGKEAutoDiscoverMetaData added in v0.0.40

func WithGKEAutoDiscoverMetaData() discoveryOption

func WithKubernetes added in v0.0.20

func WithKubernetes(clusterName, namespace, pod, containerName string) discoveryOption

Types

type Services

type Services struct {
	Logging           *logging.Client
	ErrorReporting    *errorreporting.Client
	PubSub            *pubsub.Client
	TracerProvider    *sdktrace.TracerProvider
	MonitoredResource *monitoredres.MonitoredResource
}

Services contains all Google Cloud Services that we use TODO: Spit non-Services to another struct

func DiscoverServices

func DiscoverServices(project, serviceName string, tracerProviderOptions []sdktrace.TracerProviderOption, opts ...discoveryOption) (*Services, error)

DiscoverServices builds clients for all Services that we use.

func (*Services) Close

func (s *Services) Close()

Close closes all Clients that were created. Does **not** handle errors in close since there usually is not much that can be done on Close failure anyway.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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