tracer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteOperation = "delete"
View Source
const ReadOperation = "read"
View Source
const WriteOperation = "write"

Variables

This section is empty.

Functions

This section is empty.

Types

type TraceDecoder

type TraceDecoder struct {
	bytes.Buffer
}

func (*TraceDecoder) GetOperations

func (td *TraceDecoder) GetOperations() (operations []TraceOperation)

func (*TraceDecoder) GetWriteOperations

func (td *TraceDecoder) GetWriteOperations() (operations []TraceOperation)

func (*TraceDecoder) RequireKeyPrefixWrittenInSequence

func (td *TraceDecoder) RequireKeyPrefixWrittenInSequence(
	t *testing.T,
	keys []string,
)

func (*TraceDecoder) RequireKeyPrefixesWritten

func (td *TraceDecoder) RequireKeyPrefixesWritten(
	t *testing.T,
	keys []string,
)

RequireKeyPrefixesWritten checks if the list of key prefixes were written to. This should be used when the order of writes do not have a deterministic ordering, i.e when state is branched and written back to. TODO(CLOB-851) update this function to assert ordering of key prefixes within stores.

func (*TraceDecoder) RequireReadWriteInSequence

func (td *TraceDecoder) RequireReadWriteInSequence(
	t *testing.T,
	expectedOperations []TraceOperation,
)

type TraceOperation

type TraceOperation struct {
	Operation string                 `json:"operation"`
	Key       string                 `json:"key"`
	Value     string                 `json:"value"`
	Metadata  map[string]interface{} `json:"metadata"`
}

Jump to

Keyboard shortcuts

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