server

package
v0.0.5-RC5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutorMock

type ExecutorMock struct {

	// embedding an instance of pb.UnimplementedExecutorServiceServer will allow us
	// to implement all the required method interfaces.
	pb.UnimplementedExecutorServiceServer
	// contains filtered or unexported fields
}

ExecutorMock represents and Executor mock server

func NewExecutorMock

func NewExecutorMock(address string, tvContainer *testvector.Container) *ExecutorMock

NewExecutorMock is the ExecutorMock constructor.

func (*ExecutorMock) ProcessBatch

func (server *ExecutorMock) ProcessBatch(ctx context.Context, request *pb.ProcessBatchRequest) (*pb.ProcessBatchResponse, error)

ProcessBatch implements the ProcessBatch gRPC method.

func (*ExecutorMock) Start

func (server *ExecutorMock) Start()

Start sets up the stateDB server to process requests.

func (*ExecutorMock) Stop

func (server *ExecutorMock) Stop()

Stop stops the server.

type StateDBMock

type StateDBMock struct {

	// embedding an instance of pb.UnimplementedStateDBServiceServer will allow us
	// to implement all the required method interfaces.
	pb.UnimplementedStateDBServiceServer
	// contains filtered or unexported fields
}

StateDBMock represents a StateDB mock server.

func NewStateDBMock

func NewStateDBMock(address string, tvContainer *testvector.Container) *StateDBMock

NewStateDBMock is the StateDBMock constructor.

func (*StateDBMock) Get

func (server *StateDBMock) Get(ctx context.Context, request *pb.GetRequest) (*pb.GetResponse, error)

Get is the mock of the method for getting values from the tree.

func (*StateDBMock) GetProgram

func (server *StateDBMock) GetProgram(ctx context.Context, request *pb.GetProgramRequest) (*pb.GetProgramResponse, error)

GetProgram is the mock of the method for getting SC contents from the tree.

func (*StateDBMock) Set

func (server *StateDBMock) Set(ctx context.Context, request *pb.SetRequest) (*pb.SetResponse, error)

Set is the mock of the method for setting values in the tree.

func (*StateDBMock) SetProgram

func (server *StateDBMock) SetProgram(ctx context.Context, request *pb.SetProgramRequest) (*pb.SetProgramResponse, error)

SetProgram is the mock of the method for setting SC contents in the tree.

func (*StateDBMock) Start

func (server *StateDBMock) Start()

Start sets up the stateDB server to process requests.

func (*StateDBMock) Stop

func (server *StateDBMock) Stop()

Stop stops the server.

Jump to

Keyboard shortcuts

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