cleanup

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 21 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

This section is empty.

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

type ExportServer added in v0.25.0

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

func NewExportServer added in v0.25.0

func NewExportServer(cfg *Config, env *serverenv.ServerEnv) (*ExportServer, error)

NewExportServer creates a server that manages deletion of old export files that are no longer needed by clients for download.

func (*ExportServer) Routes added in v0.25.0

func (s *ExportServer) Routes(ctx context.Context) *mux.Router

Routes defines and returns the routes for the export server.

type ExposureServer added in v0.25.0

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

func NewExposureServer added in v0.25.0

func NewExposureServer(cfg *Config, env *serverenv.ServerEnv) (*ExposureServer, error)

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

func (*ExposureServer) Routes added in v0.25.0

func (s *ExposureServer) Routes(ctx context.Context) *mux.Router

Routes defines and returns the routes for the export server.

Jump to

Keyboard shortcuts

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