testutil

package
v0.0.0-...-f6126b0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeys

func GetKeys[T HasKey](items []T) []string

func GetRevisions

func GetRevisions[T HasRevision](items []T) []int64

func NewSeq

func NewSeq(start, end int64) []int64

func StartEtcd

func StartEtcd(t testing.TB) string

Types

type HasKey

type HasKey interface {
	GetKey() string
}

type HasRevision

type HasRevision interface {
	GetRevision() int64
}

type Item

type Item struct {
	*mvccpb.KeyValue
}

func CollectEvents

func CollectEvents(t *testing.T, watch clientv3.WatchChan, n int) []*Item

func NewItems

func NewItems(kvs []*mvccpb.KeyValue) []*Item

func (*Item) GetKey

func (e *Item) GetKey() string

func (*Item) GetRevision

func (e *Item) GetRevision() int64

Jump to

Keyboard shortcuts

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