Documentation ¶
Overview ¶
Package config defines the configuration values for the cron job.
Index ¶
- Constants
- Variables
- func GetAPIResultsBucketURL() (string, error)
- func GetAdditionalParams(subMapName string) (map[string]string, error)
- func GetBigQueryDataset() (string, error)
- func GetBigQueryTable() (string, error)
- func GetBlacklistedChecks() ([]string, error)
- func GetCIIDataBucketURL() (string, error)
- func GetCompletionThreshold() (float64, error)
- func GetCriticalityValues() (map[string]string, error)
- func GetInputBucketPrefix() (string, error)
- func GetInputBucketPrefixFile() (string, error)
- func GetInputBucketURL() (string, error)
- func GetMetricExporter() (string, error)
- func GetMetricStackdriverPrefix() (string, error)
- func GetProjectID() (string, error)
- func GetRawBigQueryTable() (string, error)
- func GetRawResultDataBucketURL() (string, error)
- func GetRequestSubscriptionURL() (string, error)
- func GetRequestTopicURL() (string, error)
- func GetResultDataBucketURL() (string, error)
- func GetScorecardValues() (map[string]string, error)
- func GetShardSize() (int, error)
- func GetWebhookURL() (string, error)
- func ReadConfig() error
Constants ¶
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 ¶
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") // ErrorNoConfig indicates no config file was provided, or flag.Parse() was not called. ErrorNoConfig = errors.New("no configuration file provided with --" + configFlag) )
Functions ¶
func GetAPIResultsBucketURL ¶ added in v4.9.0
GetAPIResultsBucketURL returns the bucket URL for storing cron job results.
func GetAdditionalParams ¶ added in v4.9.0
func GetBigQueryDataset ¶
GetBigQueryDataset returns the BQ dataset name to transfer cron job results.
func GetBigQueryTable ¶
GetBigQueryTable returns the table name to transfer cron job results.
func GetBlacklistedChecks ¶
GetBlacklistedChecks returns a list of checks which are not to be run.
func GetCIIDataBucketURL ¶
GetCIIDataBucketURL returns the bucket URL where CII data is stored.
func GetCompletionThreshold ¶
GetCompletionThreshold returns fraction of shards to be populated before transferring cron job results.
func GetCriticalityValues ¶ added in v4.9.0
GetCriticalityValues() returns a map of key, value pairs containing additional, criticality specific values.
func GetInputBucketPrefix ¶ added in v4.9.0
GetInputBucketPrefix() returns the prefix used when fetching files from a bucket.
func GetInputBucketPrefixFile ¶ added in v4.9.0
GetInputBucketPrefixFile() returns the file whose contents specify the prefix to use.
func GetInputBucketURL ¶ added in v4.9.0
GetInputBucketURL() returns the bucket URL for input files.
func GetMetricExporter ¶
GetMetricExporter returns the opencensus exporter type.
func GetMetricStackdriverPrefix ¶ added in v4.9.0
GetMetricStackdriverPrefix returns the prefix for stackdriver opencensus exporter.
func GetProjectID ¶
GetProjectID returns the cloud projectID for the cron job.
func GetRawBigQueryTable ¶ added in v4.2.0
GetRawBigQueryTable returns the table name to transfer cron job results.
func GetRawResultDataBucketURL ¶ added in v4.2.0
GetRawResultDataBucketURL returns the bucketURL for storing cron job's raw results.
func GetRequestSubscriptionURL ¶
GetRequestSubscriptionURL returns the subscription name of the PubSub topic for cron job reuests.
func GetRequestTopicURL ¶
GetRequestTopicURL returns the topic name for sending cron job PubSub requests.
func GetResultDataBucketURL ¶
GetResultDataBucketURL returns the bucketURL for storing cron job results.
func GetScorecardValues ¶ added in v4.9.0
GetScorecardValues() returns a map of key, value pairs containing additional, scorecard specific values.
func GetShardSize ¶
GetShardSize returns the shard_size for the cron job.
func GetWebhookURL ¶
GetWebhookURL returns the webhook URL to ping on a successful cron job completion.
func ReadConfig ¶ added in v4.9.0
func ReadConfig() error
ReadConfig reads the contents of a configuration file specified with --config for later use by getters. This function must be called before any other exported function, and after flag.Parse() is called.
Types ¶
This section is empty.