Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Example storage adapter for lua-resty-auto-ssl #205

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fititnt
Copy link

@fititnt fititnt commented Dec 1, 2019

Initial commit based the draft of PR #203 (that was based on fititnt/ap-application-load-balancer/issues/25)


This is related to the TODO/Document and formalize the API for other storage adapters.

The idea with this Pull Request is have one dummy file on the same directory as other adapters /lib/resty/auto-ssl/storage_adapters that could be used as reference to new people literaly just copy and paste and then bootstrap their customization.

Things I open to discussion, but I guess that could give the general idea

  • The required functions for an storage adapter should exist, and be explicit marked as such.
    • These functions in special should have very well documented input parameters, and their types, and the output parameters, and their types
  • Optional functions, and why they exist, maybe even give example from other storages, should also be be marked.
    • But these explain the developer that could just remove if not pertinent
  • The example.lua adapter should pass the CI tests for code linting.
    • It's a good start. If something make the CI tests complain, is new code, not the example code
    • In case this is unavoidable, we could opt to mark these funcions or methods as commented.
  • Include local help functions, even if they could be optional
    • Example, the local function prefixed_key(self, key)

Note: no problem if this PR does not get merged (one good example would be use README.md or other place to document); Even if this PR get merget, very likely could be a place to be rewritten by the main maintainer to reflect all the options that are exposed to storage drivers. This example module could also get new updates from time to time when new options are exposed to other storage drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant