counting

package
v0.0.0-...-1864f74 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	// Applies by the given delta (+ or -) and return the updated value.
	// Returns (updated value, true if value was updated in memory, err if any error happened)
	// It is possible that the value is updated but an error occurred while trying to persist it.
	Increment(context.Context, int) (int, bool, error)
	Refresh(context.Context) (int, error)
	Delete(context.Context) error
}

func NewEtcdCounter

func NewEtcdCounter(c *etcdclientv3.Client, key string, initialValue int) Counter

Jump to

Keyboard shortcuts

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