dsl

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dsl is base package for mocks of DSL transaction creators. The main purpose of these mock is to simulate DSL usage and to record called steps (transaction operations).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitFunc

type CommitFunc = func(Ops []TxnOp) error

CommitFunc is function called from inside DSL to trigger commit processing(applying TxnOp-s retrieved by DSL,...) in TxnTracker

type CommonMockDSL

type CommonMockDSL struct {
	// List of transaction operations in the order as they were called.
	Ops []TxnOp

	// CommitFunc is function called from inside DSL to trigger commit processing(applying TxnOp-s retrieved by DSL,...)
	// in TxnTracker
	CommitFunc CommitFunc
}

CommonMockDSL holds common data for all mocked DSLs

type Reply

type Reply struct {
	Err error
}

Reply interface allows to wait for a reply to previously called Send() and extract the result from it (success/error).

func (Reply) ReceiveReply

func (dsl Reply) ReceiveReply() error

ReceiveReply waits for a reply to previously called Send() and returns the result (error or nil).

type TxnOp

type TxnOp struct {
	// Key under which the value is stored or from which the value was removed.
	Key string
	// Value stored under the key or nil if it was deleted.
	Value proto.Message /* nil if deleted */
}

TxnOp stores all information about a transaction operation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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