port

package
v0.2.0-dev Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleLoggerAdapterPort

type ConsoleLoggerAdapterPort interface {
	Write(p []byte) (n int, err error)
}

type ElasticsearchLoggerAdapterPort

type ElasticsearchLoggerAdapterPort interface {
	Write(p []byte) (n int, err error)
}

type HttpAdapterPort

type HttpAdapterPort interface {
	SetListener(listener net.Listener)
	GetListener() net.Listener
	SetServerName(name string)
	UseLogger(logger service.LoggerServicePort)
	UseMetrics(metrics service.MetricsServicePort)
	UseSwagger()
	UseProfiling()
	AddRoute(method string, path string, handler extra.HttpRequestHandler)
	Serve() error
	ServeTLS(certFile, keyFile string) error
	Shutdown() error
	GetAdapterName() string
}

type LoggerAdapterPort

type LoggerAdapterPort interface {
	SetLevel(level int)

	Trace()
	Debug()
	Info()
	Warn()
	Error()
	Fatal()
	Panic()

	Str(key, val string)
	Int(key string, i int)
	Dur(key string, d time.Duration)
	Err(err error)

	Msg(msg string)
	Msgf(format string, v ...any)
	Write()

	Printf(format string, args ...any)
}

type MetricsAdapterPort

type MetricsAdapterPort interface {
	RegisterGoCollector()
	RegisterProcessCollector()
	RegisterBuildInfoCollector()
	NewCounter(opts prometheus.CounterOpts)
	NewCounterVec(opts prometheus.CounterOpts, labelNames []string)
	NewGauge(opts prometheus.GaugeOpts)
	NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string)
	NewHistogram(opts prometheus.HistogramOpts)
	NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string)
	NewSummary(opts prometheus.SummaryOpts)
	NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string)
	Counter(name string) prometheus.Counter
	CounterVec(name string) *prometheus.CounterVec
	Gauge(name string) prometheus.Gauge
	GaugeVec(name string) *prometheus.GaugeVec
	Histogram(name string) prometheus.Histogram
	HistogramVec(name string) *prometheus.HistogramVec
	Summary(name string) prometheus.Summary
	SummaryVec(name string) *prometheus.SummaryVec
	GetHandler() http.Handler
}

Jump to

Keyboard shortcuts

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