OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::parsec::agent::rpc::client Class Reference

RPC client for an agent. More...

#include <client.hpp>

Public Member Functions

 client (std::vector< network::endpoint_t > endpoints)
 Constructor.
 
 client ()=delete
 
 ~client ()=default
 
 client (const client &)=delete
 
auto operator= (const client &) -> client &=delete
 
 client (client &&)=delete
 
auto operator= (client &&) -> client &=delete
 
auto init () -> bool
 Intializes the underlying TCP client.
 
auto exec (runtime_locking_shard::key_type function, parameter_type param, bool is_readonly_run, const interface::exec_callback_type &result_callback) -> bool
 Requests execution of the function at a key with the given parameters.
 

Detailed Description

RPC client for an agent.

Definition at line 15 of file parsec/agent/client.hpp.

Constructor & Destructor Documentation

◆ client() [1/4]

cbdc::parsec::agent::rpc::client::client ( std::vector< network::endpoint_t > endpoints)
explicit

Constructor.

Parameters
endpointsRPC server endpoints for the agent cluster.

Definition at line 12 of file parsec/agent/client.cpp.

◆ client() [2/4]

cbdc::parsec::agent::rpc::client::client ( )
delete

◆ ~client()

cbdc::parsec::agent::rpc::client::~client ( )
default

◆ client() [3/4]

cbdc::parsec::agent::rpc::client::client ( const client & )
delete

◆ client() [4/4]

cbdc::parsec::agent::rpc::client::client ( client && )
delete

Member Function Documentation

◆ exec()

auto cbdc::parsec::agent::rpc::client::exec ( runtime_locking_shard::key_type function,
parameter_type param,
bool is_readonly_run,
const interface::exec_callback_type & result_callback ) -> bool

Requests execution of the function at a key with the given parameters.

Parameters
functionkey where function bytecode is located.
paramparameter to call function with.
is_readonly_runtrue if agent should skip writing any state changes.
result_callbackfunction to call with execution result.
Returns
true if the request was sent successfully.

Definition at line 20 of file parsec/agent/client.cpp.

◆ init()

auto cbdc::parsec::agent::rpc::client::init ( ) -> bool

Intializes the underlying TCP client.

Returns
true if the TCP client initialized successfully.

Definition at line 16 of file parsec/agent/client.cpp.

◆ operator=() [1/2]

auto cbdc::parsec::agent::rpc::client::operator= ( client && ) -> client &=delete
delete

◆ operator=() [2/2]

auto cbdc::parsec::agent::rpc::client::operator= ( const client & ) -> client &=delete
delete

The documentation for this class was generated from the following files: