-
Notifications
You must be signed in to change notification settings - Fork 7
/
client-api.tgn
1 lines (1 loc) · 12.8 KB
/
client-api.tgn
1
{"rows_views":[[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"center","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"center","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"center","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}],[{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}},{"style":{"borders":"lrtb","font_style":{},"text_color":"","bg_color":"","halign":"left","valign":"top","padding":{"top":10,"right":5,"bottom":10,"left":5},"border_color":""}}]],"model":{"rows":[[{"value":"Function","cspan":1,"rspan":1,"markup":[2,8]},{"value":"Description","cspan":1,"rspan":1,"markup":[2,11]},{"value":"Status","cspan":1,"rspan":1,"markup":[2,6]}],[{"value":"\nclient->Call<Service, Request, Response>(\n \"Method\",\n \"host\",\n [](auto&& call) {\n // ...\n });","cspan":1,"rspan":1,"markup":[2,101]},{"value":"Initiates an RPC to\n\"/package.Service/Method\"\nfor host/authority \"host\"\nwith the specified\ncallback. The 'call'\nargument is a\n'stout::borrowed_ptr'.\n\nYou can omit host.","cspan":1,"rspan":1,"markup":[2,168]},{"value":"ClientStatus::Ok() on success,\notherwise ClientStatus::Error()\neither due to an invalid RPC\nmethod (e.g., service and/or method\ndoesn't exist, incorrect\nrequest/response types, etc)\nor a connectivity issue.","cspan":1,"rspan":1,"markup":[2,206]}],[{"value":"client->Call<Request, Response>(\n \"package.Service.Method\",\n [](auto&& call) {\n // ...\n });","cspan":1,"rspan":1,"markup":[2,97]},{"value":"Same as above but without\nthe 'Service' type;\nall you need are the\ngenerated protobuf\nheaders!","cspan":1,"rspan":1,"markup":[2,94]},{"value":"See above.","cspan":1,"rspan":1,"markup":[2,10]}],[{"value":"client->Call<Request, Response>(\n \"package.Service.Method\",\n [](auto* call, auto&& response) {\n // OnRead\n },\n [](auto* call, const grpc::Status& s) {\n // OnFinished\n });","cspan":1,"rspan":1,"markup":[2,63,4,33,2,1,4,13,2,71]},{"value":"Overload that takes the\n'OnRead()' and\n'OnFinished()' handlers\nand sets them up\nautomagically.\n\nNote: this overload never\nhas access to the\n'stout::borrowed_ptr'.","cspan":1,"rspan":1,"markup":[2,162]},{"value":"See above.","cspan":1,"rspan":1,"markup":[2,10]}],[{"value":"call->OnRead([](auto* call, auto&& response) {\n if (response) {\n // Received a request.\n } else {\n // End of stream or broken stream.\n }\n});","cspan":1,"rspan":1,"markup":[2,149]},{"value":"Starts reading responses.","cspan":1,"rspan":1,"markup":[2,25]},{"value":"ClientCallStatus::Ok on\nsuccess, otherwise the\ncall likely needs to be\ncancelled.","cspan":1,"rspan":1,"markup":[2,81]}],[{"value":"\n\n\ncall->OnFinished(\n [](auto* call, const grpc::Status& s) {\n // ...\n });","cspan":1,"rspan":1,"markup":[2,85]},{"value":"Invoked when a call has\nfinished. Note that 'call'\nshould not be used after\nyour handler is invoked\nunless you haven't yet\nrelinquished the\nborrowed_ptr passed to\nthe initial 'Client::Call'\nhandler.","cspan":1,"rspan":1,"markup":[2,198]},{"value":"ClientCallStatus::Ok unless\ncalled multiples times.\n","cspan":1,"rspan":1,"markup":[2,52]}],[{"value":"call->WriteAndDone(request);\n\n// ...\n\nauto options = grpc::WriteOptions();\n\ncall->WriteAndDone(request, options);\n\ncall->WriteAndDone(\n response,\n options, // Can be omitted.\n [](bool ok) {\n if (ok) {\n // Write succeeded.\n } else {\n // Write failed.\n }\n });","cspan":1,"rspan":1,"markup":[2,298]},{"value":"Writes a request to the\nserver and performs\n'WritesDone()'.\nNote that this is\nthe only available at\ncompile time for RPCs with\na unary request.\n\n\n\nNOTE: all Write*()\nfunctions have an overload\nthat takes a callback\nwhich will be invoked\nto indicate if the write\nsucceeded or failed.","cspan":1,"rspan":1,"markup":[2,282]},{"value":"ClientCallStatus::Ok means\nthe response has been\nqueued to go out on the\nwire, but has not yet been\nsent.\n\nClientCallStatus::WritingUnavailable\nmeans that writing is no longer\navailable, likely due to a\ncancelled call or broken stream.","cspan":1,"rspan":1,"markup":[2,235]}],[{"value":"call->Write(request);\n\n// ...\n\nauto options = grpc::WriteOptions();\n\ncall->Write(request, options);\n\ncall->Write(\n request,\n options, // Can be omitted.\n [](bool ok) {\n if (ok) {\n // Write succeeded.\n } else {\n // Write failed.\n }\n\n });\n","cspan":1,"rspan":1,"markup":[2,278]},{"value":"Writes a request with\noptional options. Only\navailable at compile time\nfor client streaming RPCs.","cspan":1,"rspan":1,"markup":[2,97]},{"value":"ClientCallStatus::Ok on success.\n\nSee further discussion above in\n'WriteAndDone()'.","cspan":1,"rspan":1,"markup":[2,83]}],[{"value":"call->WritesDone();","cspan":1,"rspan":1,"markup":[2,19]},{"value":"Signals to the server\nthat the client\nstream of requests is\ndone.","cspan":1,"rspan":1,"markup":[2,65]},{"value":"ClientCallStatus::Ok on success.\n\nAny subsequent calls to a 'Write*()'\nvariant will return\nClientCallStatus::WaitingForFinished\nafter doing a 'WritesDone()'\nbecause the only valid call is\n'Finish()' at this point.","cspan":1,"rspan":1,"markup":[2,91,4,36,2,86]}],[{"value":"\ncall->Finish();\n\n// ...\n\ncall->Finish(\n [](auto* call, const grpc::Status& s) {\n });","cspan":1,"rspan":1,"markup":[2,91]},{"value":"Indicates the call is\nis finished. When the\ncall has actually\nfinished the callback\nset up by 'IsFinished()'\ngets invoked.\n\nThe 'Finish()' overload\nthat takes a callback\nperforms 'OnFinished()'\nbefore calling 'Finish()'\nand it is an error to call\n'OnFinished()' as well\nas the 'Finish()'\noverload that takes a\ncallback. ","cspan":1,"rspan":1,"markup":[2,320]},{"value":"ClientCallStatus::Ok on success.\n\nIf the call is already done,\ne.g., because it was cancelled,\nit may return\nClientCallStatus::Finished.","cspan":1,"rspan":1,"markup":[2,136]}],[{"value":"call->WritesDoneAndFinish();\n\ncall->WritesDoneAndFinish(\n [](auto* call, const grpc::Status& s) {\n });","cspan":1,"rspan":1,"markup":[2,108]},{"value":"Performs 'WritesDone()'\nand then 'Finish()',\noptionally performing\n'OnFinished()' if a\ncallback is passed.","cspan":1,"rspan":1,"markup":[2,106]},{"value":"","cspan":1,"rspan":1,"markup":[]}],[{"value":"\n\ncall->context()->TryCancel();\n","cspan":1,"rspan":1,"markup":[2,32]},{"value":"Attempts to cancel\nthe call. If successful\nany 'OnFinished()'\nhandlers will be\ninvoked with a status of\ngrpc::CANCELLED.","cspan":1,"rspan":1,"markup":[2,120]},{"value":"Returns void.","cspan":1,"rspan":1,"markup":[2,13]}]]},"theme":{"ColorTheme":"Default","BorderTheme":"All borders"},"fixed_layout":false,"markup":{"instances":[{},null,{"style":{"fontWeight":"","fontStyle":"","textDecoration":"","color":"","backgroundColor":""}},null,{"style":{"fontWeight":"400","fontStyle":"normal","textDecoration":"","color":"","backgroundColor":""}}]},"options":{}}