This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Add Source : KvSource #13
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*from
-n, --numbertodisplay Number of messages to display (default "1000") | ||
-h, --help Print Help (this message) and exit | ||
``` | ||
Thanks you @debovema for this work :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you (without s
)
"strings" | ||
) | ||
|
||
// KvSource impement Source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implements
LGTM :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It provides connection to many KV Store like
Consul
,Etcd
orZookeeper
: using libkv and mapstructure packages to loas data into the structThe whole configuration structure is stored, using architecture like this pattern :
<prefix1>/<prefix2>/.../<fieldNameLevel1>/<fieldNameLevel2>/.../<fieldName>
<value>
It handels :
bool
,int
, ... , Squashed Embeded Substruct
, Pointer)..../<MapFieldName>/<mapKey>
-><mapValue>
(Struct as key not supported).../<SliceFieldName>/<SliceIndex>
-><value>