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

Support Records class #32

Closed
syucream opened this issue Jul 4, 2016 · 5 comments
Closed

Support Records class #32

syucream opened this issue Jul 4, 2016 · 5 comments
Milestone

Comments

@syucream
Copy link
Owner

syucream commented Jul 4, 2016

Support Records class, like Apache::Env and Nginx::Var.

@syucream
Copy link
Owner Author

syucream commented Jul 4, 2016

I want more user-friendly and type-safe config setter ...

@syucream syucream modified the milestone: 0.1 Jul 4, 2016
@syucream
Copy link
Owner Author

syucream commented Aug 6, 2016

I think this support should have some phase.

  • At 0.1, support simply interfaces, like ngx_mruby:
records = ATS::Records.new

# getter
records.get ATS::Records::TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR #=> 0
# setter
records.set ATS::Records::TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR, 1
  • In future, will support records.config like interfaces:
records = ATS::Records.new

# getter
records.proxy.config.url_remap.pristine_host_hdr #=> 0
records.url_remap.pristine_host_hdr #=> 0
# setter as #= method
records.proxy.config.url_remap.pristine_host_hdr = 1
records.url_remap.pristine_host_hdr = 1

@syucream
Copy link
Owner Author

syucream commented Aug 8, 2016

As one of the future plan, block base settings may be usuful?:

records = ATS::Records.new
records.set do |proxy|
  # records.config like accessor!
  proxy.config.url_remap.pristine_host_hdr = 1
end

@syucream
Copy link
Owner Author

syucream commented Aug 9, 2016

I registered #52 about future plans.

syucream added a commit that referenced this issue Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant