grpc
gRPC client/server, protobuf, streaming.
Load with: use grpc
Quick example
use grpc
result = grpcc("value", "value")
prn(result)
Functions
gRPC channel
grpcc(target, opts)
Performs the operation. Takes target, opts.
grpcn(chan)
Performs the operation. Takes chan.
Service definition
grpcs(name, mths)
Performs the operation. Takes name, mths.
grpcu(name, inp, out, h)
Performs the operation. Takes name, inp, out, h.
grpcc1(name, inp, out, h)
Performs the operation. Takes name, inp, out, h.
grpcs1(name, inp, out, h)
Performs the operation. Takes name, inp, out, h.
grpcb(name, inp, out, h)
Performs the operation. Takes name, inp, out, h.
Server
grpcs2(opts)
Performs the operation. Takes opts.
grpcs3(srv, svc)
Performs the operation. Takes srv, svc.
grpcs4(srv, icp)
Performs the operation. Takes srv, icp.
grpcs5(srv)
Performs the operation. Takes srv.
grpcs6(srv)
Performs the operation. Takes srv.
Client stub
grpct(chan, svc)
Performs the operation. Takes chan, svc.
grpcm(chan, mth)
Performs the operation. Takes chan, mth.
Metadata
grpcm1(pairs)
Performs the operation. Takes pairs.
grpcm2(md, k)
Performs the operation. Takes md, k.
grpcm3(md, k, v)
Performs the operation. Takes md, k, v.
Status codes
grpcs7()
Performs the operation.
grpcs8()
Performs the operation.
grpcs9()
Performs the operation.
grpcs10()
Performs the operation.
grpcs11()
Performs the operation.
grpcs12()
Performs the operation.
grpcs13()
Performs the operation.
grpcs14()
Performs the operation.
grpcs15()
Performs the operation.
Error handling
grpce(code, message, details)
Performs the operation. Takes code, message, details.
Protobuf
proto()
Converts to another format.
proto1(name, fields)
Performs the operation. Takes name, fields.
proto2(name, values)
Performs the operation. Takes name, values.
proto3(name, rpcs)
Performs the operation. Takes name, rpcs.
proto4(name, input_type, output_type, client_streaming, server_streaming)
Performs the operation. Takes name, input_type, output_type, client_streaming, server_streaming.
proto5(name, type, number, label)
Performs the operation. Takes name, type, number, label.
grpce1(msg, vals)
Performs the operation. Takes msg, vals.
grpcd(msg, bytes)
Performs the operation. Takes msg, bytes.
proto6(msg_def, bytes)
Performs the operation. Takes msg_def, bytes.
proto7(msg_def, json)
Performs the operation. Takes msg_def, json.
Protobuf types mapping
proto8(type_name)
Performs the operation. Takes type_name.
Parse proto file
grpcp(path)
Performs the operation. Takes path.
grpcs16(s)
Performs the operation. Takes s.
Code generation
proto9(proto_def, output_path)
Performs the operation. Takes proto_def, output_path.
grpcp1(proto_def)
Performs the operation. Takes proto_def.
grpcm4(msg)
Performs the operation. Takes msg.
grpcp2(type)
Performs the operation. Takes type.
grpcs17(svc)
Performs the operation. Takes svc.
Health check
grpch(server)
Checks a condition. Takes server.
Reflection
grpcr(server, proto_files)
Creates a new instance. Takes server, proto_files.
Interceptors
grpcm5()
Performs the operation.
grpcl(logger)
Closes or clears. Takes logger.
grpca(validate_fn)
Performs the operation. Takes validate_fn.
Load balancing
grpcl1(targets)
Performs the operation. Takes targets.
grpcl2(lb)
Performs the operation. Takes lb.
grpcl3(targets)
Performs the operation. Takes targets.
Retry
grpcr1(policy, fn)
Performs the operation. Takes policy, fn.
Deadlines/Timeouts
grpcw(ctx, ms)
Performs the operation. Takes ctx, ms.
grpci(ctx)
Performs the operation. Takes ctx.
Notes
- gRPC client and server - protobuf encoding, streaming.