Documentation

Overview

Package cleanup implements the API handlers for running data deletion jobs.

Package cleanup contains OpenCensus metrics and views for cleanup operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExportHandler

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

NewExportHandler creates a http.Handler that manages deletion of old export files that are no longer needed by clients for download.

func NewExposureHandler

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

NewExposureHandler creates a http.Handler for deleting exposure keys from the database.

Types

type Config

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

	Port    string        `env:"PORT, default=8080"`
	Timeout time.Duration `env:"CLEANUP_TIMEOUT, default=10m"`
	TTL     time.Duration `env:"CLEANUP_TTL, default=336h"`

	DebugOverrideCleanupMinDuration bool `env:"DEBUG_OVERRIDE_CLEANUP_MIN_DURATION, default=false"`
}

Config represents the configuration and associated environment variables for the cleanup components.

func (*Config) BlobstoreConfig

func (c *Config) BlobstoreConfig() *storage.Config

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