Fixup Lua docs

This commit is contained in:
Ottatop 2024-02-23 17:49:09 -06:00
parent d1e7c92774
commit 3959a87019
2 changed files with 8 additions and 5 deletions

View file

@ -8,6 +8,7 @@ local h2_connection = require("http.h2_connection")
local protobuf = require("pinnacle.grpc.protobuf") local protobuf = require("pinnacle.grpc.protobuf")
local pb = require("pb") local pb = require("pb")
---@nodoc
---Create appropriate headers for a gRPC request. ---Create appropriate headers for a gRPC request.
---@param service string The desired service ---@param service string The desired service
---@param method string The desired method within the service ---@param method string The desired method within the service

View file

@ -51,6 +51,7 @@ local stream_control = {
-- TODO: rewrite ldoc_gen so you don't have to stick @nodoc everywhere -- TODO: rewrite ldoc_gen so you don't have to stick @nodoc everywhere
---@nodoc
---@type table<SignalServiceMethod, { sender: H2Stream?, callbacks: function[], on_response: fun(response: table) }> ---@type table<SignalServiceMethod, { sender: H2Stream?, callbacks: function[], on_response: fun(response: table) }>
local signals = { local signals = {
OutputConnect = { OutputConnect = {
@ -142,19 +143,20 @@ end
---@class SignalHandleModule ---@class SignalHandleModule
local signal_handle = {} local signal_handle = {}
---@classmod
---A handle to a connected signal that can be used to disconnect the provided callback. ---A handle to a connected signal that can be used to disconnect the provided callback.
--- ---
---@class SignalHandle ---@class SignalHandle
---@field signal SignalServiceMethod ---@field private signal SignalServiceMethod
---@field callback function The callback you connected ---@field private callback function The callback you connected
local SignalHandle = {} local SignalHandle = {}
---@nodoc ---@nodoc
---@class SignalHandlesModule ---@class SignalHandlesModule
local signal_handles = {} local signal_handles = {}
---@nodoc ---@classmod
---@class SignalHandles ---@class SignalHandles A collection of `SignalHandle`s retreived through a `connect_signal` function.
local SignalHandles = {} local SignalHandles = {}
---@nodoc ---@nodoc
@ -165,7 +167,7 @@ local signal = {}
signal.handle = signal_handle signal.handle = signal_handle
signal.handles = signal_handles signal.handles = signal_handles
---@nodoc ---Disconnect the provided callback from this signal.
function SignalHandle:disconnect() function SignalHandle:disconnect()
local cb_index = nil local cb_index = nil
for i, cb in ipairs(signals[self.signal].callbacks) do for i, cb in ipairs(signals[self.signal].callbacks) do