class

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package class classifies a key-value by the kind of operation it represents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class string

Class categorizes a KeyValue.

const (
	// Constant specifies that the KeyValue has no Variable,
	// MaybeMore, Clear, or VStampFuture. This kind of KeyValue
	// can be used to perform a set operation or is returned by
	// a get operation.
	Constant Class = "constant"

	// VStampKey specifies that the KeyValue of the Constant class,
	// but it contains a VStampFuture in the key. This kind of KeyValue
	// can only be used to perform a set operation. When the KeyValue
	// is later read, the VStampFuture we be replaced by a VStampKey.
	VStampKey Class = "vstampkey"

	// VStampVal specifies that the KeyValue of the Constant class,
	// but it contains a VStampFuture in the value. This kind of KeyValue
	// can only be used to perform a set operation. When the KeyValue
	// is later read, the VStampFuture we be replaced by a VStampKey.
	VStampVal Class = "vstampval"

	// Clear specifies that the KeyValue has no Variable, MaybeMore,
	// or VStampFuture and has Clear as it's value. This kind of
	// KeyValue can be used to perform a clear operation.
	Clear Class = "clear"

	// ReadSingle specifies that the KeyValue has a Variable as it's
	// value and doesn't have a Variable or MaybeMore in its Key. It
	// also must not contain a VStampFuture anywhere in the KeyValue.
	// This kind of KeyValue can be used to perform a get operation
	// that returns a single KeyValue.
	ReadSingle Class = "single"

	// ReadRange specifies that the KeyValue has a Variable
	// or MaybeMore in its key and doesn't have a Clear as it's
	// value. This kind of KeyValue can be used to perform a get
	// operation that returns multiple KeyValue.
	ReadRange Class = "range"
)

func Classify

func Classify(kv q.KeyValue) Class

Classify returns the Class of the given KeyValue.

Jump to

Keyboard shortcuts

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