Help us shape the future of Go! Take the 2026 Go Developer Survey

output

package
v0.12.824 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const OTelConfigKey = "otel.config"

OTelConfigKey is the flag carrying the OTelConfig JSON / YAML.

Variables

This section is empty.

Functions

func InitOTelConfig added in v0.12.730

func InitOTelConfig(raw string) error

InitOTelConfig parses the --otel.config argument; an empty value keeps the defaults and an exporter without an endpoint is rejected.

Types

type AbstractTabularWriter

type AbstractTabularWriter struct {
	// contains filtered or unexported fields
}

type BasicColumnOrderer

type BasicColumnOrderer struct {
	// contains filtered or unexported fields
}

func (*BasicColumnOrderer) GetColumnOrder

func (bco *BasicColumnOrderer) GetColumnOrder() []string

type CSVWriter

type CSVWriter struct {
	AbstractTabularWriter
	// contains filtered or unexported fields
}

func (*CSVWriter) Write

func (csvw *CSVWriter) Write(res sqldata.ISQLResultStream) error

func (*CSVWriter) WriteError

func (csvw *CSVWriter) WriteError(err error, errorPresentation string) error

type IColumnOrderer

type IColumnOrderer interface {
	GetColumnOrder() []string
}

type IOutputWriter

type IOutputWriter interface {
	Write(sqldata.ISQLResultStream) error
	WriteError(error, string) error
}

func GetOutputWriter

func GetOutputWriter(
	writer io.Writer,
	errWriter io.Writer,
	outputCtx internaldto.OutputContext,
) (IOutputWriter, error)

func NewJSONLWriter added in v0.10.591

func NewJSONLWriter(writer io.Writer, errWriter io.Writer) IOutputWriter

func NewJSONWriter added in v0.9.250

func NewJSONWriter(writer io.Writer, errWriter io.Writer) IOutputWriter

func NewOTelWriter added in v0.11.669

func NewOTelWriter(writer io.Writer, errWriter io.Writer, query string, startTime time.Time) IOutputWriter

NewOTelWriter returns the writer for one statement: query is the submitted text and startTime the snapshot instant stamped on every record.

type JSONLWriter added in v0.10.591

type JSONLWriter struct {
	// contains filtered or unexported fields
}

func (*JSONLWriter) Write added in v0.10.591

func (jw *JSONLWriter) Write(res sqldata.ISQLResultStream) error

func (*JSONLWriter) WriteError added in v0.10.591

func (jw *JSONLWriter) WriteError(err error, errorPresentation string) error

type JSONWriter added in v0.5.375

type JSONWriter struct {
	// contains filtered or unexported fields
}

func (*JSONWriter) Write added in v0.5.375

func (jw *JSONWriter) Write(res sqldata.ISQLResultStream) error

func (*JSONWriter) WriteError added in v0.5.375

func (jw *JSONWriter) WriteError(err error, errorPresentation string) error

type OTelConfig added in v0.12.730

type OTelConfig struct {
	// Exporter, when set, also pushes every statement's records to the
	// OTLP/HTTP logs endpoint it names.
	Exporter *sink.OTLPHTTPConfig `json:"exporter,omitempty" yaml:"exporter,omitempty"`
}

OTelConfig is the --otel.config DTO: settings for the otel output format.

type OTelWriter added in v0.11.669

type OTelWriter struct {
	// contains filtered or unexported fields
}

OTelWriter emits one OTLP/JSON LogsData per result row plus a completion record per statement, so a result set can be shipped as a timestamped inventory snapshot. Every record of a statement shares the snapshot instant, snapshot id and span id. When --otel.config names an exporter the statement is also pushed there as a batch.

func (*OTelWriter) Write added in v0.11.669

func (ow *OTelWriter) Write(res sqldata.ISQLResultStream) error

func (*OTelWriter) WriteError added in v0.11.669

func (ow *OTelWriter) WriteError(err error, errorPresentation string) error

type PrettyWriter

type PrettyWriter struct {
	AbstractTabularWriter
	// contains filtered or unexported fields
}

func (*PrettyWriter) Write

func (rw *PrettyWriter) Write(res sqldata.ISQLResultStream) error

func (*PrettyWriter) WriteError

func (rw *PrettyWriter) WriteError(err error, errorPresentation string) error

type RawWriter

type RawWriter struct {
	AbstractTabularWriter
	// contains filtered or unexported fields
}

func (*RawWriter) Write

func (rw *RawWriter) Write(res sqldata.ISQLResultStream) error

func (*RawWriter) WriteError

func (rw *RawWriter) WriteError(err error, errorPresentation string) error

type TableWriter

type TableWriter struct {
	AbstractTabularWriter
	// contains filtered or unexported fields
}

func (*TableWriter) Write

func (tw *TableWriter) Write(res sqldata.ISQLResultStream) error

func (*TableWriter) WriteError

func (tw *TableWriter) WriteError(err error, errorPresentation string) error

Jump to

Keyboard shortcuts

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