forked from 3rdparty/eventuals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server-api.tgn
1 lines (1 loc) · 12 KB
/
server-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":""}}]],"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":"\n\nserver->Serve<Service, Request, Response>(\n \"Method\",\n \"host\",\n [](auto&& call) {\n // ...\n });","cspan":1,"rspan":1,"markup":[2,103]},{"value":"Serves RPC at\n\"/package.Service/Method\"\nfor host/authority \"host\"\nwith the specified\ncallback. The 'call'\nargument is a\n'std::unique_ptr'.\n\nYou can omit host and it\ndefaults to \"*\".","cspan":1,"rspan":1,"markup":[2,181]},{"value":"ServerStatus::Ok() on success,\notherwise ServerStatus::Error()\neither due to an invalid RPC\nmethod (e.g., service and/or method\ndoesn't exist, incorrect\nrequest/response types, endpoint\nalready being served, etc).","cspan":1,"rspan":1,"markup":[2,213]}],[{"value":"server->Serve<Request, Response>(\n \"package.Service.Method\",\n [](auto&& call) {\n\n // ...\n });","cspan":1,"rspan":1,"markup":[2,99]},{"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":"server->Serve<Request, Response>(\n \"package.Service.Method\",\n [](auto* call, auto&& request) {\n // OnRead\n },\n [](auto* call, bool cancelled) {\n // OnDone\n });","cspan":1,"rspan":1,"markup":[2,64,4,32,2,1,4,13,2,60]},{"value":"Overload that takes the\n'OnRead()' and 'OnDone()'\nhandlers and sets them\nup automagically.\n\nNote: this overload never\nhas access to the\n'std::unique_ptr'.","cspan":1,"rspan":1,"markup":[2,154]},{"value":"See above.","cspan":1,"rspan":1,"markup":[2,10]}],[{"value":"call->OnRead([](auto* call, auto&& request) {\n if (request) {\n // Received a request.\n } else {\n // End of stream or broken stream.\n }\n});","cspan":1,"rspan":1,"markup":[2,147]},{"value":"Starts reading requests.","cspan":1,"rspan":1,"markup":[2,24]},{"value":"ServerCallStatus::Ok on\nsuccess, otherwise the\ncall likely needs to be\ncancelled.","cspan":1,"rspan":1,"markup":[2,81]}],[{"value":"\n\n\ncall->OnDone([](auto* call, bool cancelled) {\n // ...\n});","cspan":1,"rspan":1,"markup":[2,61]},{"value":"Invoked when a call has\nfinished. Note that 'call'\nshould not be used after\nyour handler is invoked\nunless you haven't yet\nreleased the\nunique_ptr from the\ninitial call.","cspan":1,"rspan":1,"markup":[2,169]},{"value":"Always ServerCallStatus::Ok.\n","cspan":1,"rspan":1,"markup":[2,29]}],[{"value":"auto status = grpc::Status::OK;\n\ncall->WriteAndFinish(response, status);\n\n// ...\n\nauto options = grpc::WriteOptions();\n\ncall->WriteAndFinish(\n response,\n options,\n status);\n\ncall->WriteAndFinish(\n response,\n options, // Can be omitted.\n [](bool ok) {\n if (ok) {\n // Write succeeded.\n } else {\n // Write failed.\n }\n },\n status);","cspan":1,"rspan":1,"markup":[2,380]},{"value":"Writes a response to the\nclient and finishes the\ncall with the specified\nstatus. Note that this is\nthe only available at\ncompile time for RPCs with\na unary response.\n\n\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,306]},{"value":"ServerCallStatus::Ok means\nthe response has been\nqueued to go out on the\nwire, but has not yet been\nsent.\n\nServerCallStatus::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(response);\n\n// ...\n\nauto options = grpc::WriteOptions();\n\ncall->Write(response, options);\n\ncall->Write(\n response,\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,281]},{"value":"Writes a response with\noptional options. Only\navailable at compile time\nfor server streaming RPCs.","cspan":1,"rspan":1,"markup":[2,98]},{"value":"ServerCallStatus::Ok on success.\n\nSee further discussion above in\n'WriteAndFinish()'.","cspan":1,"rspan":1,"markup":[2,85]}],[{"value":"call->WriteLast(response);\n\n// ...\n\nauto options = grpc::WriteOptions();\n\ncall->WriteLast(response, options);\n\ncall->WriteLast(\n response,\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,293]},{"value":"Writes a response and sets\nthe bit indicating this\nis the last response the\nserver will send. Only\navailable at compile time\nfor server streaming RPCs.","cspan":1,"rspan":1,"markup":[2,151]},{"value":"ServerCallStatus::Ok on success.\n\nAny subsequent calls to a 'Write*()'\nvariant will return\nServerCallStatus::WaitingForFinished\nafter doing a 'WriteLast()'\nbecause the only valid call is\n'Finish()' at this point.","cspan":1,"rspan":1,"markup":[2,91,4,36,2,85]}],[{"value":"\nauto status = grpc::Status::OK;\n\ncall->Finish(status);","cspan":1,"rspan":1,"markup":[2,55]},{"value":"Finishes the call with\nthe specified status.","cspan":1,"rspan":1,"markup":[2,44]},{"value":"ServerCallStatus::Ok on success.\n\nIf the call is already done,\ne.g., because it was cancelled,\nit may return\nServerCallStatus::Done.","cspan":1,"rspan":1,"markup":[2,132]}],[{"value":"\n\ncall->context()->TryCancel();\n","cspan":1,"rspan":1,"markup":[2,32]},{"value":"Attempts to cancel\nthe call. If successful\nany 'OnDone()' handlers\nwill be invoked with\n'cancelled' set to true.","cspan":1,"rspan":1,"markup":[2,112]},{"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":{}}