sync

package
v1.28.10 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 1 Imported by: 33 modules, 31 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnceErr

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

OnceErr wraps the behavior of recording an error once and signal on a channel when this has occurred. Signaling is done by closing of the channel.

Type is safe for concurrent usage.

func NewOnceErr

func NewOnceErr() *OnceErr

NewOnceErr return a new OnceErr

func (*OnceErr) Err

func (e *OnceErr) Err() error

Err acquires a read-lock and returns an error if one has been set.

func (*OnceErr) ErrorSet

func (e *OnceErr) ErrorSet() <-chan struct{}

ErrorSet returns a channel that will be used to signal that an error has been set. This channel will be closed when the error value has been set for OnceErr.

func (*OnceErr) SetError

func (e *OnceErr) SetError(err error)

SetError acquires a write-lock and will set the underlying error value if one has not been set.

Jump to

Keyboard shortcuts

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