recorder

package
v0.0.0-...-4dcfcdd Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package recorder contains an acceptor implementation that records the method calls it sees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Multi    *types.MultiBatch
	Table    *types.TableBatch
	Temporal *types.TemporalBatch
}

Call is a union struct that retains the batch that was passed in.

func (*Call) Count

func (c *Call) Count() int

Count returns the number of enclosed mutations.

type Recorder

type Recorder struct {
	Next types.MultiAcceptor // An optional delegate for calls.
	// contains filtered or unexported fields
}

Recorder implements types.MultiAcceptor, recording its inputs. This type is safe for concurrent access.

func (*Recorder) AcceptMultiBatch

func (r *Recorder) AcceptMultiBatch(
	ctx context.Context, batch *types.MultiBatch, options *types.AcceptOptions,
) error

AcceptMultiBatch implements types.MultiAcceptor.

func (*Recorder) AcceptTableBatch

func (r *Recorder) AcceptTableBatch(
	ctx context.Context, batch *types.TableBatch, options *types.AcceptOptions,
) error

AcceptTableBatch implements types.TableAcceptor.

func (*Recorder) AcceptTemporalBatch

func (r *Recorder) AcceptTemporalBatch(
	ctx context.Context, batch *types.TemporalBatch, options *types.AcceptOptions,
) error

AcceptTemporalBatch implements types.TemporalAcceptor.

func (*Recorder) Calls

func (r *Recorder) Calls() []*Call

Calls returns a copy of the recording.

func (*Recorder) Count

func (r *Recorder) Count() int

Count returns the number of enclosed mutations.

Jump to

Keyboard shortcuts

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