Skip to content

Instantly share code, notes, and snippets.

@smuthali
Last active November 9, 2016 01:31
Show Gist options
  • Save smuthali/d628a7162f367b57a269b5fdeb354146 to your computer and use it in GitHub Desktop.
Save smuthali/d628a7162f367b57a269b5fdeb354146 to your computer and use it in GitHub Desktop.
Zookeeper myid template
{{- $myid_counter := key "zk/zkcounter" | parseInt -}}
{{- range $i, $services := service "zookeeper" -}}
{{- with node -}}
{{- if eq $services.Node .Node.Node -}}
{{- $myid_counter | add $i -}}
{{- end -}}
{{- end -}}
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment