clientdb

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type InsertLogParams

type InsertLogParams struct {
	TraceID              sql.NullString
	SpanID               sql.NullString
	Timestamp            int64
	SeverityNumber       int64
	SeverityText         string
	Body                 []byte
	Attributes           []byte
	InstrumentationScope []byte
	Resource             []byte
	ResourceSchemaUrl    string
}

type InsertSpanParams

type InsertSpanParams struct {
	TraceID                string
	SpanID                 string
	TraceState             string
	ParentSpanID           sql.NullString
	Flags                  int64
	Name                   string
	Kind                   string
	StartTime              int64
	EndTime                sql.NullInt64
	Attributes             []byte
	DroppedAttributesCount int64
	Events                 []byte
	DroppedEventsCount     int64
	Links                  []byte
	DroppedLinksCount      int64
	StatusCode             int64
	StatusMessage          string
	InstrumentationScope   []byte
	Resource               []byte
	ResourceSchemaUrl      string
}

type Log

type Log struct {
	ID                   int64
	TraceID              sql.NullString
	SpanID               sql.NullString
	Timestamp            int64
	SeverityNumber       int64
	SeverityText         string
	Body                 []byte
	Attributes           []byte
	InstrumentationScope []byte
	Resource             []byte
	ResourceSchemaUrl    string
}

type Metric

type Metric struct {
	ID   int64
	Data []byte
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) InsertLog

func (q *Queries) InsertLog(ctx context.Context, arg InsertLogParams) (int64, error)

func (*Queries) InsertMetric

func (q *Queries) InsertMetric(ctx context.Context, data []byte) (int64, error)

func (*Queries) InsertSpan

func (q *Queries) InsertSpan(ctx context.Context, arg InsertSpanParams) (int64, error)

func (*Queries) SelectLogsSince

func (q *Queries) SelectLogsSince(ctx context.Context, arg SelectLogsSinceParams) ([]Log, error)

func (*Queries) SelectMetricsSince

func (q *Queries) SelectMetricsSince(ctx context.Context, arg SelectMetricsSinceParams) ([]Metric, error)

func (*Queries) SelectSpansSince

func (q *Queries) SelectSpansSince(ctx context.Context, arg SelectSpansSinceParams) ([]Span, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type SelectLogsSinceParams

type SelectLogsSinceParams struct {
	ID    int64
	Limit int64
}

type SelectMetricsSinceParams

type SelectMetricsSinceParams struct {
	ID    int64
	Limit int64
}

type SelectSpansSinceParams

type SelectSpansSinceParams struct {
	ID    int64
	Limit int64
}

type Span

type Span struct {
	ID                     int64
	TraceID                string
	SpanID                 string
	TraceState             string
	ParentSpanID           sql.NullString
	Flags                  int64
	Name                   string
	Kind                   string
	StartTime              int64
	EndTime                sql.NullInt64
	Attributes             []byte
	DroppedAttributesCount int64
	Events                 []byte
	DroppedEventsCount     int64
	Links                  []byte
	DroppedLinksCount      int64
	StatusCode             int64
	StatusMessage          string
	InstrumentationScope   []byte
	Resource               []byte
	ResourceSchemaUrl      string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳