Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Add Source : KvSource #13

Merged
merged 8 commits into from
Jun 20, 2016
Merged

Add Source : KvSource #13

merged 8 commits into from
Jun 20, 2016

Conversation

cocap10
Copy link
Contributor

@cocap10 cocap10 commented Jun 17, 2016

It provides connection to many KV Store like Consul, Etcd or Zookeeper : using libkv and mapstructure packages to loas data into the struct

The whole configuration structure is stored, using architecture like this pattern :

  • Key : <prefix1>/<prefix2>/.../<fieldNameLevel1>/<fieldNameLevel2>/.../<fieldName>
  • Value : <value>

It handels :

  • All mapstructure features(bool, int, ... , Squashed Embeded Sub struct, Pointer).
  • Maps with pattern : .../<MapFieldName>/<mapKey> -> <mapValue> (Struct as key not supported)
  • Slices (and Arraies) with pattern : .../<SliceFieldName>/<SliceIndex> -> <value>

@coveralls
Copy link

Coverage Status

Coverage decreased (-8.3%) to 78.81% when pulling 1fd4df0 on addKV into e2aa88e on master.

@@ -143,6 +144,84 @@ PointerField contains:&{BoolField:true FloatField:55.55}

```

## Full example :
[Tagoæl](https://github.com/debovema/tagoael) is a trivial example which shows how Stært can be use.
This funny golang progam takes its configuration form both TOML and Flaeg sources to display messages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*from

@coveralls
Copy link

coveralls commented Jun 17, 2016

Coverage Status

Coverage decreased (-5.4%) to 81.784% when pulling 76b7109 on addKV into e2aa88e on master.

-n, --numbertodisplay Number of messages to display (default "1000")
-h, --help Print Help (this message) and exit
```
Thanks you @debovema for this work :)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you (without s)

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.4%) to 81.784% when pulling 8182b03 on addKV into e2aa88e on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.4%) to 81.784% when pulling 63fd1b7 on addKV into e2aa88e on master.

"strings"
)

// KvSource impement Source
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implements

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.4%) to 81.784% when pulling 219b050 on addKV into e2aa88e on master.

@emilevauge
Copy link
Member

LGTM :)

@cocap10 cocap10 merged commit b432e31 into master Jun 20, 2016
@ldez ldez deleted the addKV branch June 18, 2017 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants