global

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tracer trace.Tracer = tracenoop.NewTracerProvider().Tracer("")
	Meter  metric.Meter = metricnoop.NewMeterProvider().Meter("")
)
View Source
var (
	PulumiRuntimes = []string{"go"}
)

Functions

func SetupOtelSDK

func SetupOtelSDK(ctx context.Context) (shutdown func(context.Context) error, err error)

SetupOtelSDK bootstraps the OpenTelemetry pipeline. If it does not return an error, make sure to call shutdown for proper cleanup.

func WithChallengeId

func WithChallengeId(ctx context.Context, id string) context.Context

func WithSourceId

func WithSourceId(ctx context.Context, id string) context.Context

Types

type Configuration

type Configuration struct {
	Directory string
	Otel      struct {
		Tracing     bool
		ServiceName string
	}
	Lock struct {
		Kind string

		EtcdEndpoints []string
		EtcdUsername  string
		EtcdPassword  string
	}
	OCI struct {
		RegistryURL *string
		Username    *string
		Password    *string
	}
}

Configuration holds the parameters that are shared across submodules.

var (
	Conf Configuration
)

type Logger

type Logger struct {
	Sub *zap.Logger
}

func Log

func Log() *Logger

func (*Logger) Debug

func (log *Logger) Debug(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Error

func (log *Logger) Error(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Info

func (log *Logger) Info(ctx context.Context, msg string, fields ...zap.Field)

func (*Logger) Warn

func (log *Logger) Warn(ctx context.Context, msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

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