Giter VIP home page Giter VIP logo

Comments (10)

ryanbreen avatar ryanbreen commented on July 4, 2024

Interesting. Could you provide a little more detail about what you're looking for, potentially with some examples? That'll make it easier to make sure we're on the same page.

from git2consul.

benschw avatar benschw commented on July 4, 2024

the idea is, that given the config file:

sample.json

{
    "foo": {
        "bar": "baz"
    }
}

which would normally be loaded to facilitate the following interface with consul's http api:

GET /namespace/sample.json
{
    "foo": {
        "bar": "baz"
    }
}

if the option to "load properties" or whatever was set, it would instead facilitate the following interface with consul's http api:

GET /namespace/sample.json/foo/bar
baz

to support fungible config formats, it might be better to strip extensions too:

GET /namespace/sample/foo/bar
baz

from git2consul.

ryanbreen avatar ryanbreen commented on July 4, 2024

Ahh, interesting. Let me give that some thought. Seems like a reasonable ask.

from git2consul.

ryanbreen avatar ryanbreen commented on July 4, 2024

I'm thinking a git repo is either configured to be in this mode or is not in this mode. I can't think of a clean way to support this expansion conditionally. I guess you could have some pattern matching thing in the repo config, but it seems easier to just namespace these in their own subtree.

Thoughts?

from git2consul.

benschw avatar benschw commented on July 4, 2024

I like it: a repo is configured one way or the other.

pattern matching could be a future feature if it turns out it would be useful (one way to do this would be to configure the same repo twice with different namespaces and a different "include-pattern")

from git2consul.

benschw avatar benschw commented on July 4, 2024

e.g.

"repos" : [{
  "name" : "github_data_keys",
  "url" : "[email protected]:ryanbreen/git2consul_data.git",
  "mode" : "keys",
  "include": "keys/*"
},{
  "name" : "github_data_content",
  "url" : "[email protected]:ryanbreen/git2consul_data.git",
  "mode" : "content",
  "include": "config/*"
}]

from git2consul.

ryanbreen avatar ryanbreen commented on July 4, 2024

Yep, something like that. Cool.

from git2consul.

ryanbreen avatar ryanbreen commented on July 4, 2024

I decided to leave .json in the key name. I kinda like that because it makes it very obvious what's going on, especially since I also decided to support non-JSON files in repos that support expand_keys.

from git2consul.

ryanbreen avatar ryanbreen commented on July 4, 2024

Published as version 0.9.0.

from git2consul.

benschw avatar benschw commented on July 4, 2024

Awesome! Thanks!

from git2consul.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.