shutdownbound

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package shutdownbound is the bound of the Shutdown of the store behind a resolver: what the first Shutdown call of the resolver fixes, whichever caller ends up running the store's Shutdown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bound

type Bound struct {
	At       time.Time
	Deadline time.Time
}

Bound is the instant of the first Shutdown call and its deadline (zero when it had none).

func (Bound) Context

func (b Bound) Context(ctx context.Context, now time.Time, grace time.Duration) (context.Context, context.CancelFunc)

Context is the context of the Shutdown of the store: it does not end when the context of a caller does (another caller may wait for the result). It ends grace after the deadline of the first Shutdown call, or grace after that call when it had no deadline, so a store that stops only on cancellation does not stay pending for ever.

func (Bound) Remaining

func (b Bound) Remaining(now time.Time, grace time.Duration) time.Duration

Remaining is how long the store has left at now when the first call had no deadline: the grace counted from the first call, never negative.

Jump to

Keyboard shortcuts

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