cleaner

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cleaner provides functionality to purge API request and response records stored in a PostgreSQL database that were created by go11y's AddDBStorer transport middleware. Not all services using go11y's AddDBStorer transport middleware need to implement the cleaner, only those that pass PII to external services though a client using go11y's AddDBStorer transport middleware. Max age of records kept is 180 days

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

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

Cleaner struct for cleaning up old records created by the storer

func New

func New(ctx context.Context, dbConnStr string) (dbCleaner *Cleaner, fault error)

New creates a new Cleaner instance with a database connection pool

func (*Cleaner) Close

func (s *Cleaner) Close(ctx context.Context)

Close closes the Cleaner's database connection

func (*Cleaner) Exec

func (s *Cleaner) Exec(ctx context.Context) error

Exec cleans the clears out db records created by the storer that are older than 180 days

Jump to

Keyboard shortcuts

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