bigtable

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

README

bigtable

Usage

source:
  name: bigtable
  config:
    project_id: google-project-id
    service_account_base64: _________BASE64_ENCODED_SERVICE_ACCOUNT_________________

Inputs

Key Value Example Description required
project_id string my-project BigTable Project ID true
service_account_base64 string ____BASE64_ENCODED_SERVICE_ACCOUNT____ Service Account in base64 encoded string. optional
Notes

You will have to set the env var GOOGLE_APPLICATION_CREDENTIALS with value as path of the service account json file if service_account_base64 is not specified.

Outputs

Field Sample Value
resource.urn project_id.instance_name.table_name
resource.name table_name
resource.service bigtable
attributes.fields Fields
Fields
Field Sample Value
column_family [{\"Name\":\"ts\",\"GCPolicy\":\"(age() \\u003e 90d)\"}]

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAdminClientMW added in v0.8.9

func WithAdminClientMW(projectID, instanceName string) func(AdminClient) AdminClient

func WithInstanceAdminClientMW added in v0.8.9

func WithInstanceAdminClientMW(projectID string) func(InstanceAdminClient) InstanceAdminClient

Types

type AdminClient added in v0.8.5

type AdminClient interface {
	Tables(ctx context.Context) ([]string, error)
	TableInfo(ctx context.Context, table string) (*bigtable.TableInfo, error)
}

AdminClient is an interface for *bigtable.AdminClient

type AdminClientMW added in v0.8.9

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

func (*AdminClientMW) TableInfo added in v0.8.9

func (o *AdminClientMW) TableInfo(ctx context.Context, table string) (res *bigtable.TableInfo, err error)

func (*AdminClientMW) Tables added in v0.8.9

func (o *AdminClientMW) Tables(ctx context.Context) (res []string, err error)

type Config

type Config struct {
	ProjectID            string `mapstructure:"project_id" validate:"required"`
	ServiceAccountBase64 string `mapstructure:"service_account_base64"`
	// contains filtered or unexported fields
}

Config holds the configurations for the bigtable extractor

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor used to extract bigtable metadata

func New

func New(logger log.Logger, newClient NewClientFunc, newAdminClient NewAdminClientFunc) *Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error

Extract checks if the extractor is configured and if so, then extracts the metadata and returns the assets.

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) error

type InstanceAdminClient added in v0.8.5

type InstanceAdminClient interface {
	Instances(ctx context.Context) ([]*bigtable.InstanceInfo, error)
}

InstanceAdminClient is an interface for *bigtable.InstanceAdminClient

type InstanceAdminClientMW added in v0.8.9

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

func (*InstanceAdminClientMW) Instances added in v0.8.9

func (o *InstanceAdminClientMW) Instances(ctx context.Context) (res []*bigtable.InstanceInfo, err error)

type InstancesFetcher

type InstancesFetcher interface {
	Instances(context.Context) ([]*bigtable.InstanceInfo, error)
}

InstancesFetcher is an interface for fetching instances

type NewAdminClientFunc added in v0.8.5

type NewAdminClientFunc func(ctx context.Context, instance string, config Config) (AdminClient, error)

type NewClientFunc added in v0.8.5

type NewClientFunc func(ctx context.Context, cfg Config) (InstanceAdminClient, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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