config

package
v2.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config defines the configuration values for the cron job.

Index

Constants

View Source
const (
	// ShardMetadataFilename file contains metadata for the created shard.
	ShardMetadataFilename string = ".shard_metadata"
	// ShardNumFilename is the name of the file that stores the number of shards.
	ShardNumFilename string = ".shard_num"
	// TransferStatusFilename file identifies if shard transfer to BigQuery is completed.
	TransferStatusFilename string = ".transfer_complete"
)

Variables

View Source
var (
	// ErrorEmptyConfigValue indicates the value for the configuration option was empty.
	ErrorEmptyConfigValue = errors.New("config value set to empty")
	// ErrorValueConversion indicates an unexpected type was found for the value of the config option.
	ErrorValueConversion = errors.New("unexpected type, cannot convert value")
)

Functions

func GetBigQueryDataset

func GetBigQueryDataset() (string, error)

GetBigQueryDataset returns the BQ dataset name to transfer cron job results.

func GetBigQueryTable

func GetBigQueryTable() (string, error)

GetBigQueryTable returns the table name to transfer cron job results.

func GetBigQueryTableV2 added in v2.2.3

func GetBigQueryTableV2() (string, error)

GetBigQueryTableV2 returns the table name to transfer cron job results. UPGRADEv2: to remove.

func GetCompletionThreshold added in v2.2.3

func GetCompletionThreshold() (float64, error)

GetCompletionThreshold returns fraction of shards to be populated before transferring cron job results.

func GetMetricExporter

func GetMetricExporter() (string, error)

GetMetricExporter returns the opencensus exporter type.

func GetProjectID

func GetProjectID() (string, error)

GetProjectID returns the cloud projectID for the cron job.

func GetRequestSubscriptionURL

func GetRequestSubscriptionURL() (string, error)

GetRequestSubscriptionURL returns the subscription name of the PubSub topic for cron job reuests.

func GetRequestTopicURL

func GetRequestTopicURL() (string, error)

GetRequestTopicURL returns the topic name for sending cron job PubSub requests.

func GetResultDataBucketURL

func GetResultDataBucketURL() (string, error)

GetResultDataBucketURL returns the bucketURL for storing cron job results.

func GetResultDataBucketURLV2 added in v2.2.3

func GetResultDataBucketURLV2() (string, error)

GetResultDataBucketURLV2 returns the bucketURL for storing cron job results. UPGRADEv2: to remove.

func GetShardSize

func GetShardSize() (int, error)

GetShardSize returns the shard_size for the cron job.

func GetWebhookURL added in v2.2.3

func GetWebhookURL() (string, error)

GetWebhookURL returns the webhook URL to ping on a successful cron job completion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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