bigtable

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 16 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

This section is empty.

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 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 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