predecessor

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package predecessor defines how a replacement handles its predecessor.

Index

Constants

View Source
const (
	Now   = "now"
	After = "after"
	Never = "never"
)

Variables

View Source
var (
	DefaultAgent = Policy{Choice: Now, Days: 7}
	DefaultOther = Policy{Choice: After, Days: 7}
)

Functions

This section is empty.

Types

type Policy

type Policy struct {
	Choice string
	Days   int
}

Policy is a validated choice and, for After, a delay in days.

func (Policy) Normalize

func (p Policy) Normalize() Policy

Normalize allows the stored default day count on non-delayed choices.

func (Policy) Validate

func (p Policy) Validate() error

Validate checks a complete policy. Days is meaningful only for After.

Jump to

Keyboard shortcuts

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