writer

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package writer handles writing health data to various outputs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWriter

type FileWriter interface {
	WriteJSON(data *collector.HealthData, outputPath string) error
	WriteCSV(data *collector.HealthData, outputPath string) error
}

FileWriter defines the interface for writing health data to files

func NewFileWriter

func NewFileWriter(otlpConverter converter.OTLPConverter, csvConverter converter.CSVConverter) FileWriter

NewFileWriter creates a new file writer

type HTTPError

type HTTPError struct {
	StatusCode int
	Status     string
	Message    string
}

HTTPError represents an HTTP error with status code

func (*HTTPError) Error

func (e *HTTPError) Error() string

type HTTPWriter

type HTTPWriter interface {
	Send(ctx context.Context, data *collector.HealthData, metricsEndpoint string, logsEndpoint string, maxRetries int, authToken string) (newToken string, err error)
	SetJWTRefreshFunc(refreshFunc JWTRefreshFunc)
}

HTTPWriter defines the interface for sending health data via HTTP

func NewHTTPWriter

func NewHTTPWriter(httpClient *http.Client, otlpConverter converter.OTLPConverter) HTTPWriter

NewHTTPWriter creates a new HTTP writer

type JWTRefreshFunc

type JWTRefreshFunc func(ctx context.Context) (string, error)

JWTRefreshFunc is a function type for refreshing JWT tokens

Jump to

Keyboard shortcuts

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