Documentation

Overview

    Package bq contains helpers for uploading rows to BigQuery.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func LogToken

    func LogToken(ctx context.Context, tok proto.Message, dryRun bool) error

      LogToken emits a PubSub task to record the token to the BigQuery log.

      If `dryRun` is true, will just log the token to the local text log.

      func RegisterTokenKind

      func RegisterTokenKind(table string, prototype proto.Message)

        RegisterTokenKind registers a TQ class to log a particular token kind into a particular BigQuery table.

        Types

        type Inserter

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

          Inserter receives PubSub push messages and converts them to BQ inserts.

          func NewInserter

          func NewInserter(ctx context.Context, projectID string) (*Inserter, error)

            NewInserter constructs an instance of Inserter.

            func (*Inserter) HandlePubSubPush

            func (ins *Inserter) HandlePubSubPush(ctx context.Context, body io.Reader) error

              HandlePubSubPush handles incoming PubSub push request.

              Source Files