Skip to content

main #

fn main #

fn main()

fn new_petstore_json_rpc_ws_client #

fn new_petstore_json_rpc_ws_client(config ClientConfig) !PetstoreJsonRpcClient

rpcwebsocket.RpcWsClient

fn websocket_example #

fn websocket_example() !

struct ClientConfig #

@[params]
struct ClientConfig {
	address string
	logger  log.Logger
}

struct Pet #

struct Pet {}

struct Petstore #

@[heap]
struct Petstore {
	pets map[string]Pet
}

fn (Petstore) get_pet #

fn (mut handler Petstore) get_pet(name string) !Pet

struct PetstoreJsonRpcClient #

struct PetstoreJsonRpcClient {
mut:
	transport &jsonrpc.IRpcTransportClient
}

fn (PetstoreJsonRpcClient) get_pet #

fn (mut client PetstoreJsonRpcClient) get_pet(name string) !Pet

struct PetstoreJsonRpcHandler #

@[heap]
struct PetstoreJsonRpcHandler {
mut:
	petstore Petstore
}

fn (PetstoreJsonRpcHandler) handle #

fn (mut handler PetstoreJsonRpcHandler) handle(msg string) !string