ready

package
v1.0.0 Latest Latest
Warning

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

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

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