syncx

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SucceedOnce

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

SucceedOnce is a sync.Once variant that allows for the operation to fail.

func (*SucceedOnce) Do

func (o *SucceedOnce) Do(
	ctx context.Context,
	fn func(ctx context.Context) error,
) error

Do executes the fn if and only if it has not been called successfully before.

Jump to

Keyboard shortcuts

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