ready

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 1 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 ready reports whether a process's consumer loops are all pulling, for the run in progress: a readiness probe must not see a run that ended.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signal

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

Signal is the readiness of one process across its runs.

func New

func New() *Signal

New returns a signal that is not ready.

func (*Signal) Begin

func (s *Signal) Begin(n int) (parts []func(), end func())

Begin starts a run of n parts. It returns one callback per part, to call when that part pulls (calling it again counts once), and end, to call when the run returns. With no parts the run is ready at once.

func (*Signal) C

func (s *Signal) C() <-chan struct{}

C returns a channel closed while the current run is ready. Once a run ends, C returns a new, open channel.

Jump to

Keyboard shortcuts

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