Commit d96dd94c authored by Boris Glimcher's avatar Boris Glimcher Committed by Tomasz Zawadzki
Browse files

go/rpc: add TCP to documentation



Change-Id: I9cf5daeaa40d1d4263ab1066dd9afccfa426f1f0
Signed-off-by: default avatarBoris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20140


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent d51fa2c7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
# JSON-RPC 2.0 client in Go

This directory contains JSON-RPC client written in Go. The main goal is to ease communication with
SPDK over Unix socket in Go. In addition, this repository provides integration of a client
SPDK over Unix and TCP socket in Go. In addition, this repository provides integration of a client
with `rpc.py` - Go client replaces Python client.

## Client integration with rpc.py
@@ -92,11 +92,11 @@ Struct represents JSON-RPC 2.0 Error object. For more information please visit

#### CreateClientWithJsonCodec

This method creates a new JSON-RPC 2.0 client. Currently only Unix sockets are supported.
This method creates a new JSON-RPC 2.0 client. Both Unix and TCP sockets are supported.

Input:

- `network`: Type of network. Currently only `unix` is supported.
- `network`: Type of network. Both `unix` and `tcp` are supported.
- `address`: Address to given network.

Output:
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ func verifyRequestParamsType(params any) error {
}

// CreateClientWithJsonCodec creates a new JSON-RPC client.
// Currently only Unix sockets are supported.
// Both Unix and TCP sockets are supported
func CreateClientWithJsonCodec(network, address string) (*Client, error) {
	switch network {
	case "unix", "unixgram", "unixpacket":