xbigtable

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PreDefinedRowKeyTimestampIso      = "timestampIso"
	PreDefinedRowKeyUuid              = "uuid"
	PreDefinedRowKeyInvertedTimestamp = "invertedTimestamp"
	PreDefinedRowKeyKeysInMap         = "keysInMap"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BigTableAdminClient

type BigTableAdminClient interface {
	Tables(ctx context.Context) ([]string, error)
	CreateTable(ctx context.Context, table string) error
	TableInfo(ctx context.Context, table string) (*bigtable.TableInfo, error)
	CreateColumnFamily(ctx context.Context, table, family string) error
	SetGCPolicy(ctx context.Context, table, family string, policy bigtable.GCPolicy) error
}

type BigTableClient

type BigTableClient interface {
	Open(table string) *bigtable.Table
}

type BigTableTable

type BigTableTable interface {
	Apply(ctx context.Context, row string, m *bigtable.Mutation, opts ...bigtable.ApplyOption) (err error)

	// A missing row will return a zero-length map and a nil error.
	ReadRow(ctx context.Context, row string, opts ...bigtable.ReadOption) (bigtable.Row, error)
}

type Extractor

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

func NewExtractor

func NewExtractor(
	spec model.Spec,
	client BigTableClient,
	adminClient BigTableAdminClient) (*Extractor, error)

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, query model.ExtractorQuery, result any) (error, bool)

func (*Extractor) ExtractFromSink

func (e *Extractor) ExtractFromSink(ctx context.Context, query model.ExtractorQuery, result *[]*model.Transformed) (error, bool)

func (*Extractor) SendToSource

func (e *Extractor) SendToSource(ctx context.Context, eventData any) (string, error)

func (*Extractor) StreamExtract

func (e *Extractor) StreamExtract(
	ctx context.Context,
	reportEvent model.ProcessEventFunc,
	err *error,
	retryable *bool)

type Loader

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

func NewLoader

func NewLoader(
	ctx context.Context,
	spec *model.Spec,
	id string,
	client BigTableClient,
	adminClient BigTableAdminClient) (*Loader, error)

func (*Loader) Shutdown

func (l *Loader) Shutdown()

func (*Loader) StreamLoad

func (l *Loader) StreamLoad(ctx context.Context, data []*model.Transformed) (string, error, bool)

The GEIST BigTable Loader implementation only supports a single input Transformed object, since using the EventSplit transform doesn't make sense in this case.

type Query

type Query struct {
	Type    QueryType
	Table   string
	RowKey  string
	LatestN int
}

type QueryType

type QueryType int
const (
	InvalidQueryType QueryType = iota
	KeyValue
	LatestN
	All
)

type RowKeyValue

type RowKeyValue struct {
	RowKey string
	Value  []byte
}

Jump to

Keyboard shortcuts

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