pgpart

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRetentionMonths = 12

	EnsureAhead = 2
)

Variables

This section is empty.

Functions

func MonthStart

func MonthStart(now time.Time) time.Time

Types

type Round

type Round struct {
	Skipped bool
	Created []string
	Dropped []string
}

type Table

type Table struct {
	Pool   *pgxpool.Pool
	Parent string

	RetentionMonths int
}

func (*Table) DropExpired

func (t *Table) DropExpired(ctx context.Context, now time.Time) ([]string, error)

func (*Table) EnsureForward

func (t *Table) EnsureForward(ctx context.Context, now time.Time) ([]string, error)

func (*Table) Maintain

func (t *Table) Maintain(ctx context.Context, now time.Time) (Round, error)

Jump to

Keyboard shortcuts

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