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

Change configuration package to influxdata/config #155

Closed
wants to merge 2 commits into from

Conversation

timraymond
Copy link
Contributor

We are unifying the way that we handle configuration across the products into
the influxdata/config package. This provides the same API as the
BurntSushi/toml package used previously, but uses influxdata/toml under the
hood (which is a fork of naoina/toml). The underlying toml parser has been
changed because Telegraf uses specific features of this parser that cannot be
easily replicated with the BurntSushi parser. Our fork of naoina/toml provides
support for maps and pointers within structs and toml documentation[1]
facilities, which the original does not, at present time (pull requests have
been submitted with no response with no response from the maintainer).

[1] This is accessible by adding a “doc” struct tag with a comment describing a
particular field of a config struct. When marshalling that struct as TOML, the
“doc” struct tag will be placed appropriately to
document that field in the resultant TOML output.

@nathanielc nathanielc force-pushed the tr-config branch 2 times, most recently from ab82c87 to 8778b7f Compare January 20, 2016 19:55
@nathanielc
Copy link
Contributor

@timraymond I am testing locally and this looks good.

I will need to wait for InfluxDB core to merge their config first since mine config imports some of their config.

@nathanielc
Copy link
Contributor

Link to InfluxDB PR influxdata/influxdb#5401

timraymond and others added 2 commits March 11, 2016 11:27
We are unifying the way that we handle configuration across the products
into the influxdata/config package. This provides the same API as the
BurntSushi/toml package used previously, but uses influxdata/toml under
the hood (which is a fork of naoina/toml). The underlying toml parser
has been changed because Telegraf uses specific features of this parser
that cannot be easily replicated with the BurntSushi parser.
Furthermore, our fork of naoina/toml provides support for maps and
pointers within structs and toml documentation facilities[1].

[1] This is accessible by adding a “doc” struct tag with a comment
describing a particular field of a config struct. When marshalling that
struct as TOML, the “doc” struct tag will be placed appropriately to
document that field in the resultant TOML output.
@nathanielc
Copy link
Contributor

@timraymond As per the issues found with the config package this PR is not viable in the near future. I am going to close the PR. We can open a new one once we have fixed influxdb/config

@nathanielc nathanielc closed this Mar 11, 2016
@nathanielc nathanielc deleted the tr-config branch June 17, 2016 21:19
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.

2 participants