package kube
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=3c6916dea849fb2842c4a2e8a92b6cdd
sha512=b57daa3bb4879e1f33efc157cf5c648f88455e0f7c87484d572096d46345d6a8081cc7cefb4887aa95507af8daf73b3b8570b8583106953a5ba96a874159ff00
doc/kube.test/Kube_test/Transport/index.html
Module Kube_test.TransportSource
type request = {meth : Kube.Http.meth;target : string;headers : (string * string) list;body : string option;streaming : bool;max_body_bytes : int option;
}A captured request after authentication and before HTTP framing.
val respond :
?status:int ->
?reason:string ->
?headers:(string * string) list ->
string ->
outcomeReturn one buffered response body. When the client requested streaming, a successful body is delivered as one callback chunk.
val respond_json :
?status:int ->
?reason:string ->
?headers:(string * string) list ->
Yojson.Safe.t ->
outcomeval stream :
?status:int ->
?reason:string ->
?headers:(string * string) list ->
?wait_for_cancel:bool ->
string list ->
outcomeDeliver distinct chunks in order. wait_for_cancel keeps the request open after the chunks and is useful for reflectors and controller tests. It requires the client request to carry a cancellation token.
Create a concurrent handler transport. The handler may be called from several threads and is responsible for synchronizing its own mutable state. Requests are captured safely by the testkit.
Create a FIFO transport. An extra request becomes a transport failure and is reported by verify_complete.
Check that a scripted transport consumed every outcome and received no extra requests. Handler transports are always complete.