nodeapiversion

package
v1.84.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// UpdateVersionAtLeast sets the node version to be at least the passed in version.
	// Any existing entry for the node will never have the version decreased.
	UpdateVersionAtLeast(ctx context.Context, id storj.NodeID, version Version) error

	// VersionAtLeast returns true iff the recorded node version is greater than or equal
	// to the passed in version. VersionAtLeast always returns true if the passed in version
	// is HasAnything.
	VersionAtLeast(ctx context.Context, id storj.NodeID, version Version) (bool, error)
}

DB is the interface to interact with the node api version database.

type Version

type Version int

Version represents a node api version.

const (
	// HasAnything is the base case that every node will have.
	HasAnything Version = iota
	HasWindowedOrders
)

These constants describe versions of satellite APIs. You should add one when you are creating a feature that needs "ratcheting" behavior, meaning the node should no longer be allowed to use an old API after it has started using a new API. Later constants always imply earlier constants.

Jump to

Keyboard shortcuts

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