Documentation
¶
Overview ¶
Package federationout handles requests from other federation servers for data.
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 (*Config) ObservabilityExporterConfig ¶
func (c *Config) ObservabilityExporterConfig() *observability.Config
func (*Config) SecretManagerConfig ¶
type Server ¶
type Server struct {
// 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 ¶
func (s Server) Fetch(ctx context.Context, req *federation.FederationFetchRequest) (*federation.FederationFetchResponse, error)
Fetch implements the FederationServer Fetch endpoint.
Click to show internal directories.
Click to hide internal directories.