exposure-notifications-server: github.com/google/exposure-notifications-server/internal/federationin Index | Files | Directories

package federationin

import "github.com/google/exposure-notifications-server/internal/federationin"

Package federationin handles pulling data from other federation servers.


Package Files

config.go federationin.go


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


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)

func NewHandler Uses

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.

type Config Uses

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 Uses

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

func (*Config) ObservabilityExporterConfig Uses

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

func (*Config) SecretManagerConfig Uses

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


databasePackage database is a database interface to federation in.
modelPackage model is a model abstraction of federation in.

Package federationin imports 31 packages (graph). Updated 2020-09-27. Refresh now. Tools for package owners.