dsl

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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