seqobsv

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package seqobsv wants to supply an observable value sepcialized for sequence numbers in append-only logs. It should be fine for access from multiple goroutines.

These values only go up by one. For margaret they start with 0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observable

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

func New

func New(start uint64) *Observable

New creates a new Observable

func (*Observable) Inc

func (seq *Observable) Inc() uint64

func (*Observable) Seq

func (seq *Observable) Seq() int64

func (*Observable) Value

func (seq *Observable) Value() uint64

Value returns the current value

func (*Observable) WaitFor

func (seq *Observable) WaitFor(n uint64) <-chan struct{}

Jump to

Keyboard shortcuts

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