clickhousereader

package
v0.0.0-...-8a5a737 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

Clickhouse Reader

This package has been copied from Signoz and adapted, see https://github.com/SigNoz/signoz/tree/9c4521b34a82d5fcd01cde39ea3de6a796c54ea6/pkg/query-service/app/clickhouseReader.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouseReader

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

SpanWriter for reading spans from ClickHouse

func NewReader

func NewReader(clickHouseUrl string) *ClickHouseReader

NewTraceReader returns a TraceReader for the database

func (*ClickHouseReader) ClearTracesTable

func (r *ClickHouseReader) ClearTracesTable(ctx context.Context) error

func (*ClickHouseReader) GetConn

func (r *ClickHouseReader) GetConn() clickhouse.Conn

func (*ClickHouseReader) GetTrace

func (*ClickHouseReader) GetTraces

func (r *ClickHouseReader) GetTraces(ctx context.Context, selectors model.Selector) (*[]model.GetTracesDBResponse, error)

func (*ClickHouseReader) ListTraces

func (r *ClickHouseReader) ListTraces(ctx context.Context) (*[]model.SearchSpansResult, error)

func (*ClickHouseReader) Searchtrace

func (r *ClickHouseReader) Searchtrace(ctx context.Context, trace string) (*[]model.SearchSpansResult, error)

type Connector

type Connector func(cfg *namespaceConfig) (clickhouse.Conn, error)

Connecto defines how to connect to the database

type Encoding

type Encoding string
const (
	// EncodingJSON is used for spans encoded as JSON.
	EncodingJSON Encoding = "json"
	// EncodingProto is used for spans encoded as Protobuf.
	EncodingProto Encoding = "protobuf"
)

type Options

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

Options store storage plugin related configs

func NewOptions

func NewOptions(datasource string, primaryNamespace string, otherNamespaces ...string) *Options

NewOptions creates a new Options struct.

Jump to

Keyboard shortcuts

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