federationout

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 27 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 federationout handles requests from other federation servers for data.

Package federationout contains OpenCensus metrics and views for federationout operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(env *serverenv.ServerEnv, config *Config) federation.FederationServer

NewServer builds a new FederationServer.

Types

type BuildIteratorRequest added in v0.11.0

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

type Config

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

	Port           string        `env:"PORT, default=8080"`
	MaxRecords     uint32        `env:"MAX_RECORDS, default=500"`
	Timeout        time.Duration `env:"RPC_TIMEOUT, default=5m"`
	TruncateWindow time.Duration `env:"TRUNCATE_WINDOW, default=1h"`

	// AllowAnyClient, if true, removes authentication requirements on the
	// federation endpoint. In practice, this is only useful in local testing.
	AllowAnyClient bool `env:"ALLOW_ANY_CLIENT"`

	// TLSCertFile is the certificate file to use if TLS encryption is enabled on
	// the server. If present, TLSKeyFile must also be present. These settings
	// should be left blank on Managed Cloud Run where the TLS termination is
	// handled by the environment.
	TLSCertFile string `env:"TLS_CERT_FILE"`
	TLSKeyFile  string `env:"TLS_KEY_FILE"`
}

Config is the configuration for the federation components (data sent to 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

type Server struct {
	federation.UnimplementedFederationServer
	// contains filtered or unexported fields
}

func (Server) AuthInterceptor

func (s Server) AuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

AuthInterceptor validates incoming OIDC bearer token and adds corresponding FederationAuthorization record to the context.

func (Server) Fetch

Fetch implements the FederationServer Fetch endpoint.

Directories

Path Synopsis
Package database is a database interface to federation out.
Package database is a database interface to federation out.

Jump to

Keyboard shortcuts

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