cleanup

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

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

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

Jump to

Keyboard shortcuts

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