~/bend-docscommunity

src/grpcio.bend relies on unsafe/foreign

raw source on the hub · import bend-kube-runtime@0.10.0.0/src/grpcio.bend as Grpcio

5 imports
import Base
import ./http.bend as H
import ./h2.bend as T
import ./h2io.bend as I
import ./grpc.bend as G

Types

type GSink source · line 25 · raw

Data

type GCall source · line 28 · raw

Data

Definitions

def Grpc.put source · line 31 · raw

@+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+sid:U32 -> @ch:0xc8d18670ba37041507e7f53cc7972ec6/src/h2.Chunk -> IO(Unit)

def Grpc.start source · line 36 · raw

@+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+sid:U32 -> @started:Bool -> IO(Unit)

def Grpc.send source · line 44 · raw

@k:GSink -> @msg:List<&2, U32> -> IO(GSink)

Sends one message of the answer (the headers first, the first time).

def Grpc.finish source · line 53 · raw

@k:GSink -> @st:0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus -> IO(Unit)

Ends the answer with a status.

def Grpc.reply source · line 59 · raw

@k:GSink -> @r:Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, U32>> -> IO(Unit)

A unary call's answer: its message and OK, or a status.

def Grpc.deadline source · line 71 · raw

@m:Maybe<&2, String> -> U32

def Grpc.one source · line 78 · raw

@+hs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @r:Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>> -> @+k:GSink -> @+calls:Chan(GCall) -> IO(Unit)

def Grpc.request.go source · line 91 · raw

@+sid:U32 -> @+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+hs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @body:List<&2, U32> -> @+calls:Chan(GCall) -> @ok:Bool -> IO(Unit)

def Grpc.request source · line 99 · raw

@+sid:U32 -> @+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @r:Result<&2, &2, String, 0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Resp> -> @+calls:Chan(GCall) -> IO(Unit)

def Grpc.take source · line 107 · raw

@q:0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Req -> @+calls:Chan(GCall) -> IO(Unit)

A stream from the HTTP/2 server: its request read whole, then handed on.

def Grpc.taken source · line 116 · raw

@m:Maybe<&1, 0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Req> -> @+calls:Chan(GCall) -> IO(Unit)

def Grpc.intake source · line 123 · raw

@outer:Nat -> @fuel:Nat -> @+reqs:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Req) -> @+calls:Chan(GCall) -> IO(Unit)

def Grpc.serve source · line 136 · raw

@l:Listener -> @+calls:Chan(GCall) -> IO(Unit)

Serves gRPC on l, each call going to calls.

def Grpc.expired source · line 142 · raw

@r:Maybe<&1, Unit> -> @+sid:U32 -> @+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> IO(Unit)

def Grpc.http_status.go source · line 193 · raw

@s:String -> @missing:Bool -> @busy:Bool -> 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus

The status of an answer that is not HTTP 200 (PROTOCOL-HTTP2.md's map).

def Grpc.http_status source · line 202 · raw

@+s:String -> 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus

def Grpc.answer.ok source · line 206 · raw

@st:0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus -> @body:List<&2, U32> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.answer.trailers source · line 213 · raw

@hs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @t:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @body:List<&2, U32> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.answer.http.go source · line 221 · raw

@+status:String -> @hs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @t:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @body:List<&2, U32> -> @ok:Bool -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.answer.http source · line 229 · raw

@+status:String -> @hs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @t:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/http.Header> -> @body:List<&2, U32> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.answer source · line 233 · raw

@r:Result<&2, &2, String, 0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Resp> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.timely source · line 240 · raw

@r:Maybe<&1, Result<&2, &2, String, 0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Resp>> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>

def Grpc.call source · line 247 · raw

@+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+method:String -> @msg:List<&2, U32> -> @+ms:U32 -> @none:Bool -> IO(Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>)

def Grpc.stream source · line 261 · raw

@+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+method:String -> @msg:List<&2, U32> -> @+ms:U32 -> IO(Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>>)

Every message of a call to method with msg (a server-streaming call's whole stream), within ms milliseconds unless ms is 0.

def Grpc.single source · line 265 · raw

@r:Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, List<&2, U32>>> -> Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, U32>>

def Grpc.unary source · line 275 · raw

@+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @+method:String -> @msg:List<&2, U32> -> @+ms:U32 -> IO(Result<&2, &2, 0xc8d18670ba37041507e7f53cc7972ec6/src/grpc.GStatus, List<&2, U32>>)

A unary call: its answer's one message, or its status.

Templates

template Grpc.timed source · line 151 · raw

@-h:(@_:GCall -> IO(Unit)) -> @c:GCall -> @+ms:U32 -> @+sid:U32 -> @+conn:Chan(0xc8d18670ba37041507e7f53cc7972ec6/src/h2io.H2Msg) -> @none:Bool -> IO(Unit)

template Grpc.handle source · line 161 · raw

@-h:(@_:GCall -> IO(Unit)) -> @c:GCall -> IO(Unit)

Runs h on c, and resets the stream if c's deadline passes first.

template Grpc.handled source · line 166 · raw

@-h:(@_:GCall -> IO(Unit)) -> @m:Maybe<&1, GCall> -> IO(Unit)

template Grpc.loop source · line 173 · raw

@-h:(@_:GCall -> IO(Unit)) -> @outer:Nat -> @fuel:Nat -> @+calls:Chan(GCall) -> IO(Unit)

template Grpc.run source · line 186 · raw

@-h:(@_:GCall -> IO(Unit)) -> @+calls:Chan(GCall) -> IO(Unit)

Takes calls off calls, each to h on its own computation.