Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IngestorConfig ¶
type IngestorConfig struct { Port uint16 `short:"p" long:"port" description:"the port to listen on" default:"8080" env:"PORT" value-name:"PORT" yaml:"port"` GitHub IngestorGitHub `group:"GitHub Options" yaml:"github"` PubSub IngestorPubSub `group:"PubSub Options" yaml:"pubsub"` Metrics IngestorMetrics `group:"Metrics Options" yaml:"metrics"` }
func LoadIngestorConfig ¶
func LoadIngestorConfig(bs []byte) (*IngestorConfig, error)
func (*IngestorConfig) IsSentryConfigured ¶
func (c *IngestorConfig) IsSentryConfigured() bool
func (*IngestorConfig) Merge ¶
func (c *IngestorConfig) Merge(other *IngestorConfig) error
func (*IngestorConfig) Validate ¶
func (c *IngestorConfig) Validate() []error
type IngestorGitHub ¶
type IngestorGitHub struct {
WebhookSecretTokens []string `` /* 184-byte string literal not displayed */
}
type IngestorMetrics ¶
type IngestorMetrics struct { SentryDSN string `long:"sentry-dsn" description:"DSN to emit to Sentry with" env:"SENTRY_DSN" value-name:"DSN" yaml:"sentry_dsn"` DatadogAPIKey string `long:"datadog-api-key" description:"key to emit to datadog" env:"DATADOG_API_KEY" value-name:"KEY" yaml:"datadog_api_key"` Environment string `` /* 137-byte string literal not displayed */ }
type IngestorOpts ¶
type IngestorOpts struct { ConfigFile cmdflag.FileFlag `long:"config-file" description:"path to config file" value-name:"PATH"` *IngestorConfig }
type IngestorPubSub ¶
type IngestorPubSub struct { ProjectName string `long:"pubsub-project-name" description:"GCP Project Name" value-name:"NAME" yaml:"project_name"` Topic string `long:"pubsub-topic" description:"PubSub Topic to send message to" value-name:"NAME" yaml:"topic"` PrivateKeyPath cmdflag.FileFlag `` /* 128-byte string literal not displayed */ }
type WorkerConfig ¶
type WorkerConfig struct { WorkDir string `long:"work-dir" description:"directory to work in" value-name:"PATH" yaml:"work_dir"` RepositoryDiscoveryInterval time.Duration `` /* 206-byte string literal not displayed */ CredentialCounterInterval time.Duration `` /* 199-byte string literal not displayed */ Whitelist []string `` /* 152-byte string literal not displayed */ GitHub struct { AccessToken string `` /* 132-byte string literal not displayed */ PrivateKeyPath cmdflag.FileFlag `long:"github-private-key-path" description:"private key to use for GitHub auth" value-name:"SSH_KEY" yaml:"private_key_path"` PublicKeyPath cmdflag.FileFlag `long:"github-public-key-path" description:"public key to use for GitHub auth" value-name:"SSH_KEY" yaml:"public_key_path"` } `group:"GitHub Options" yaml:"github"` PubSub struct { ProjectName string `long:"pubsub-project-name" description:"GCP Project Name" value-name:"NAME" yaml:"project_name"` PublicKeyPath cmdflag.FileFlag `long:"pubsub-public-key" description:"path to file containing PEM-encoded, unencrypted RSA public key" yaml:"public_key_path"` FetchHint struct { Subscription string `long:"fetch-hint-pubsub-subscription" description:"PubSub Topic receive messages from" value-name:"NAME" yaml:"subscription"` } `group:"PubSub Fetch Hint Options" yaml:"fetch_hint"` } `group:"PubSub Options" yaml:"pubsub"` Metrics struct { SentryDSN string `long:"sentry-dsn" description:"DSN to emit to Sentry with" env:"SENTRY_DSN" value-name:"DSN" yaml:"sentry_dsn"` DatadogAPIKey string `long:"datadog-api-key" description:"key to emit to datadog" env:"DATADOG_API_KEY" value-name:"KEY" yaml:"datadog_api_key"` Environment string `long:"environment" description:"environment tag for metrics" env:"ENVIRONMENT" value-name:"NAME" yaml:"environment"` } `group:"Metrics Options" yaml:"metrics"` Slack struct { WebhookURL string `long:"slack-webhook-url" description:"Slack webhook URL" env:"SLACK_WEBHOOK_URL" value-name:"WEBHOOK" yaml:"webhook_url"` } `group:"Slack Options" yaml:"slack"` MySQL struct { Username string `long:"mysql-username" description:"MySQL username" value-name:"USERNAME" yaml:"username"` Password string `long:"mysql-password" description:"MySQL password" value-name:"PASSWORD" yaml:"password"` Hostname string `long:"mysql-hostname" description:"MySQL hostname" value-name:"HOSTNAME" yaml:"hostname"` Port uint16 `long:"mysql-port" description:"MySQL port" value-name:"PORT" yaml:"port"` DBName string `long:"mysql-dbname" description:"MySQL database name" value-name:"DBNAME" yaml:"db_name"` } `group:"MySQL Options" yaml:"mysql"` RPC struct { ClientCACertificatePath cmdflag.FileFlag `long:"rpc-server-client-ca" description:"Path to client CA certificate" yaml:"client_ca_certificate_path"` CertificatePath cmdflag.FileFlag `long:"rpc-server-cert" description:"Path to RPC server certificate" yaml:"certificate_path"` PrivateKeyPath cmdflag.FileFlag `long:"rpc-server-private-key" description:"Path to RPC server private key" yaml:"private_key_path"` BindIP string `long:"rpc-server-bind-ip" description:"IP address on which to listen for RPC traffic." yaml:"bind_ip"` BindPort uint16 `long:"rpc-server-bind-port" description:"Port on which to listen for RPC traffic." yaml:"bind_port"` } `group:"RPC Options" yaml:"rpc_server"` }
func LoadWorkerConfig ¶
func LoadWorkerConfig(bs []byte) (*WorkerConfig, error)
func (*WorkerConfig) IsPubSubConfigured ¶
func (c *WorkerConfig) IsPubSubConfigured() bool
func (*WorkerConfig) IsRPCConfigured ¶
func (c *WorkerConfig) IsRPCConfigured() bool
func (*WorkerConfig) Merge ¶
func (c *WorkerConfig) Merge(other *WorkerConfig) error
func (*WorkerConfig) Validate ¶
func (c *WorkerConfig) Validate() []error
type WorkerOpts ¶
type WorkerOpts struct { ConfigFile cmdflag.FileFlag `long:"config-file" description:"path to config file" value-name:"PATH"` *WorkerConfig }
Click to show internal directories.
Click to hide internal directories.