watcher

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 0 Imported by: 1 module, 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 watcher provides a watcher to watch the epoch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel chan *Epoch

Channel is a channel of epoch watchers.

func (Channel) Add

func (w Channel) Add(epoch uint64, closeCh <-chan struct{}) *Epoch

Add adds a epoch watcher. It returns nil if the channel is closed.

type Epoch

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

Epoch is a epoch watcher. It will be notified when the epoch is reached.

func (*Epoch) Watch

func (e *Epoch) Watch() <-chan struct{}

Watch returns a channel that will be notified when the epoch is reached.

type Epochs

type Epochs []*Epoch

Epochs is a list of epoch watchers.

func (*Epochs) Add

func (e *Epochs) Add(epoch *Epoch)

Add adds a epoch watcher.

func (*Epochs) Notify

func (e *Epochs) Notify(epoch uint64)

Notify notifies all epoch watchers that the epoch is reached.

Jump to

Keyboard shortcuts

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