federationin

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

README

Please note, this package is not under active development and is not supported. It exists solely for reference purposes.

Documentation

Overview

Package federationin handles pulling data from other federation servers.

Package federationin contains OpenCensus metrics and views for federationin operations

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)
)
View Source
var (
	ErrInvalidReportType = errors.New("invalid report type")
)

Functions

This section is empty.

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"`
	MaxIntervalAge               time.Duration `env:"MAX_INTERVAL_AGE_ON_PUBLISH, default=360h"`
	MaxMagnitudeSymptomOnsetDays uint          `env:"MAX_SYMPTOM_ONSET_DAYS, default=14"`

	// Flags for local development and testing. This will cause still valid keys
	// to not be embargoed.
	// Normally "still valid" keys can be accepted, but are embargoed.
	ReleaseSameDayKeys bool `env:"DEBUG_RELEASE_SAME_DAY_KEYS"`

	// 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"`

	// Sync configuration.
	// If accepted, both self report and recursive will be sent as clinical,
	// otherwise they will be dropped.
	AcceptSelfReport bool `env:"ACCEPT_SELF_REPORT, default=false"`
	AcceptRecursive  bool `env:"ACCEPT_RECURSIVE, default=false"`
}

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

type Server added in v0.22.0

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

func NewServer added in v0.22.0

func NewServer(cfg *Config, env *serverenv.ServerEnv) (*Server, error)

func (*Server) Routes added in v0.22.0

func (s *Server) Routes(ctx context.Context) *mux.Router

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