adx

package
v0.0.0-...-1ce6954 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ConcurrentUploads = 50

Variables

This section is empty.

Functions

func NewDispatcher

func NewDispatcher(uploaders []Uploader) *dispatcher

func NewUploader

func NewUploader(kustoCli ingest.QueryClient, opts UploaderOpts) *uploader

Types

type IngestionMapping

type IngestionMapping struct {
	Name          string    `kusto:"Name"`
	Kind          string    `kusto:"Kind"`
	Mapping       string    `kusto:"Mapping"`
	LastUpdatedOn time.Time `kusto:"LastUpdatedOn"`
	Database      string    `kusto:"Database"`
	Table         string    `kusto:"Table"`
}

type SampleType

type SampleType int
const (
	PromMetrics SampleType = iota
	OTLPLogs
)

type Syncer

type Syncer struct {
	KustoCli mgmt
	// contains filtered or unexported fields
}

func NewSyncer

func NewSyncer(kustoCli mgmt, database string, defaultMapping storage.SchemaMapping, st SampleType) *Syncer

func (*Syncer) EnsureMapping

func (s *Syncer) EnsureMapping(table string) (string, error)

EnsureMapping creates a schema mapping for the specified table if it does not exist. It returns the name of the mapping.

func (*Syncer) EnsureTable

func (s *Syncer) EnsureTable(table string) error

func (*Syncer) Open

func (s *Syncer) Open(ctx context.Context) error

type Uploader

type Uploader interface {
	service.Component

	Database() string

	// UploadQueue returns a channel that can be used to upload files to kusto.
	UploadQueue() chan *cluster.Batch

	// Mgmt executes a management query against the database.
	Mgmt(ctx context.Context, query kusto.Statement, options ...kusto.MgmtOption) (*kusto.RowIterator, error)
}

func NewFakeUploader

func NewFakeUploader(db string) Uploader

type UploaderOpts

type UploaderOpts struct {
	StorageDir        string
	Database          string
	ConcurrentUploads int
	Dimensions        []string
	DefaultMapping    storage.SchemaMapping
	SampleType        SampleType
}

Jump to

Keyboard shortcuts

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