Created
June 4, 2019 19:34
-
-
Save mantzas/b5fedc191412c510d7e29f87ddb652fd to your computer and use it in GitHub Desktop.
harvester full
This file contains hidden or 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
cfg := config{} | |
ii := []consul.Item{consul.NewKeyItem("harvester/example_03/balance")} | |
h, err := harvester.New(&cfg). | |
WithConsulSeed("127.0.0.1:8500", "", "", 0). | |
WithConsulMonitor("127.0.0.1:8500", "", "", 0, ii...). | |
Create() | |
if err != nil { | |
log.Fatalf("failed to create harvester: %v", err) | |
} | |
err = h.Harvest(ctx) | |
if err != nil { | |
log.Fatalf("failed to harvest configuration: %v", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment