infrastructure

package
v0.0.0-...-cfeb2ff Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 23 Imported by: 4

Documentation

Overview

Package infrastructure is implements an adapter to talk to low-level modules. # This manifest was generated by ymir. DO NOT EDIT.

Package infrastructure is implements an adapter to talk to low-level modules. # This manifest was generated by ymir. DO NOT EDIT.

Package infrastructure is implements an adapter to talks low-level modules. # This manifest was generated by ymir. DO NOT EDIT.

Index

Constants

View Source
const Development string = "development"

Development is debugging the constant.

Variables

This section is empty.

Functions

func GrpcMetricExporter

func GrpcMetricExporter(ctx context.Context,
	addr string, timeout time.Duration, enabled bool) (metric.Exporter, error)

GrpcMetricExporter is open connection to open telemetry collector.

func GrpcTraceExporter

func GrpcTraceExporter(ctx context.Context,
	addr string, timeout time.Duration, enabled bool) (*otlptrace.Exporter, error)

GrpcTraceExporter is open connection to open telemetry collector.

func InitializeLogger

func InitializeLogger(stage string)

InitializeLogger will set logging format.

func MetricExporter

func MetricExporter(ctx context.Context,
	debug, enabled bool, addr string,
	timeout time.Duration) (metric.Exporter, error)

MetricExporter will push to the collector.

func TraceExporter

func TraceExporter(ctx context.Context,
	debug, enabled bool, addr string,
	timeout time.Duration) (sdkTrace.SpanExporter, error)

TraceExporter will push to the collector.

Types

type MetricReturnFunc

type MetricReturnFunc func(ctx context.Context) error

MetricReturnFunc return type func with error.

func InitMetric

func InitMetric(exporter metric.Exporter) MetricReturnFunc

InitMetric create metric provider from collector exporter.

type TracerReturnFunc

type TracerReturnFunc func(ctx context.Context) error

TracerReturnFunc return type func with error.

func InitTracer

func InitTracer(serviceName string, exporter sdkTrace.SpanExporter) TracerReturnFunc

InitTracer create tracer provider from collector exporter.

Jump to

Keyboard shortcuts

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