Comments (4)
If a path is specified, file extensions are used to determine the format.
If reading from stdin, you need to specify the format.
This way you can simply point consulator at a file/directory, or, you can just pipe to it directly from a git archive
or curl ..
or whatever.
from consulator.
So to be clear; the following are exactly equivalent:
$ cat foo.yaml | consulator import -yaml
and:
$ consulator import foo.yaml
?
As well as for example:
$ mkdir -p foo
$ cat > foo/foo.yaml <<EOF
foo: bar
EOH
$ consulator import ./foo/
from consulator.
Mostly :)
When you specify a directory rather than a specific file, the relative paths of files within it are used as part of the resulting key names.
For example, given a directory structure like this:
./abc/def/xyz.yaml
with xyz.yaml containing foo: bar
consulator import ./
would result in a key path of "abc/def/xyz/foo: bar
consulator import ./abc
would result in a key path of "def/xyz/foo: bar
For your examples, the first two would have a key path of just foo: bar
whereas the last one would end up as foo/foo: bar
due to the foo.yaml filename.
consulator dump
is useful for testing things like this without polluting or needing to run consul.
from consulator.
from consulator.
Related Issues (11)
- Move to subcommand-driven cli
- Optional purge / delete HOT 1
- Handle tar archives directly
- Performance: don't walk the destination kv tree for `import`
- Is this project still updated? HOT 1
- format error HOT 6
- Add examples for consulator dump HOT 3
- Export support? HOT 6
- Support for array of objects HOT 5
- Transactions endpoint for populating KV store HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consulator.