Coder Social home page Coder Social logo

format error about consulator HOT 6 CLOSED

vTNT avatar vTNT commented on July 20, 2024
format error

from consulator.

Comments (6)

vTNT avatar vTNT commented on July 20, 2024
redis:
  - host: 1
  - k: 2

did it support this format?

from consulator.

vTNT avatar vTNT commented on July 20, 2024

i found that this format is fine:

redis:
  host: 1
  password: 2
  port: 3

from consulator.

lewispeckover avatar lewispeckover commented on July 20, 2024

No, as Consul is a simple key/value store - how would you expect your earlier examples to be represented in Consul?

from consulator.

linydquantil avatar linydquantil commented on July 20, 2024

ok, did you store redis/mysql configuration in consul? I'm currently trying to put redis/mysql configuration in Consul;

from consulator.

lewispeckover avatar lewispeckover commented on July 20, 2024

You can put any config you like in there, so long as it can be represented as keys with values - and internally Consul only supports string values.
This works:

foo:
  abc: 1
  def: x

This works:

foo:
  bar:
    abc: 1
    def: y
  xyz:
    abc: 1
    def: z

This also works:

foo:
  bar: 1
  servers:
    - server1
    - server2
    - server3

In this special case the "servers:" array will be joined into a string within consul (default glue=\n) , so you'd need to split it when you read the value back out.

from consulator.

linydquantil avatar linydquantil commented on July 20, 2024

got it, i will try it again, thank you ^ ^

from consulator.

Related Issues (11)

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.