openresty / openresty/lua-resty-dns

when destroy should be called

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
338
Forks
107
Avg merge
1h 29m
Merged PRs (30d)
2

Description

I found a destry function and just know that it can be used to clean up resources. There is nothing else described in the documentation.
So does this function have to be executed and is there a self-cleaning mechanism for the resolver object? The documentation strongly recommends that the resolver object must be initialized as a local variable in the function, meaning that it is scoped to the function. But I don't see destroy being called in any of the examples. Is it not required to be called? I think that since the function was added, it should state its application scenario, otherwise it could be misleading

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the documentation for the resolver object's destroy function and reviewing the resolver lifecycle described in the examples. Confirm whether local scoping provides automatic cleanup or explicit destruction is required, then document the relevant usage scenario and update any affected examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
networking
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.