dsl

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 1 Imported by: 7

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(values map[string]proto.Message) 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 {
	// A map of changes executed in the transaction.
	// nil value represents delete
	Values map[string]proto.Message

	// 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

func NewCommonMockDSL

func NewCommonMockDSL(commitFunc CommitFunc) CommonMockDSL

NewCommonMockDSL is a constructor for CommonMockDSL

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).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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