grace

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExpectationGraceTimeout  time.Duration
	DefaultGraceExpectations = NewGraceExpectations()
)

Define variables for the default expectation timeout and DefaultGraceExpectations instance.

Functions

func NewGraceExpectations

func NewGraceExpectations() *realGraceExpectations

NewGraceExpectations returns a GraceExpectations.

func ResetExpectations

func ResetExpectations()

warning: only used for test

func RunWithGraceSeconds

func RunWithGraceSeconds(key, action string, graceSeconds int32, f func() (bool, error)) (bool, time.Duration, error)

Types

type Action

type Action string
const (
	// Create action
	Create Action = "create"
	// Delete action
	Delete Action = "delete"
	// action includes: patch service selector
	Update Action = "patch"
	// action includes: remove service selector/restore gateway
	Restore Action = "unpatch"
)

Jump to

Keyboard shortcuts

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