federationin

package
v0.0.0-...-075157f Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package federationin handles pulling data from other federation servers.

Index

Constants

View Source
const (
	// DefaultAudience is the default OIDC audience.
	DefaultAudience = "https://exposure-notifications-server/federation"
)

Variables

View Source
var (
	// ValidAudienceStr is the regexp string of a valid audience string.
	ValidAudienceStr = `\Ahttps://.*\z`
	// ValidAudienceRegexp is the compiled regexp of a valid audience string.
	ValidAudienceRegexp = regexp.MustCompile(ValidAudienceStr)
)

Functions

func NewHandler

func NewHandler(env *serverenv.ServerEnv, config *Config) http.Handler

NewHandler returns a handler that will fetch server-to-server federation results for a single federation query.

Types

type Config

type Config struct {
	Database              database.Config
	SecretManager         secrets.Config
	ObservabilityExporter observability.Config

	Port           string        `env:"PORT, default=8080"`
	Timeout        time.Duration `env:"RPC_TIMEOUT, default=10m"`
	TruncateWindow time.Duration `env:"TRUNCATE_WINDOW, default=1h"`

	// TLSSkipVerify, if set to true, causes the server certificate to not be
	// verified. This is typically used when testing locally with self-signed
	// certificates.
	TLSSkipVerify bool `env:"TLS_SKIP_VERIFY"`

	// TLSCertFile points to an optional cert file that will be appended to the
	// system certificates.
	TLSCertFile string `env:"TLS_CERT_FILE"`

	// CredentialsFile points to a JSON credentials file. If running on Managed
	// Cloud Run, or if using $GOOGLE_APPLICATION_CREDENTIALS, leave this value
	// empty.
	CredentialsFile string `env:"CREDENTIALS_FILE"`
}

Config is the configuration for federation-pull components (data pulled from other servers).

func (*Config) DatabaseConfig

func (c *Config) DatabaseConfig() *database.Config

func (*Config) ObservabilityExporterConfig

func (c *Config) ObservabilityExporterConfig() *observability.Config

func (*Config) SecretManagerConfig

func (c *Config) SecretManagerConfig() *secrets.Config

Directories

Path Synopsis
Package database is a database interface to federation in.
Package database is a database interface to federation in.
Package model is a model abstraction of federation in.
Package model is a model abstraction of federation in.

Jump to

Keyboard shortcuts

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