Consul K/V Store Implementation For Go

Consul K/V Store Implementation For Go


Enables Consul to be used as a configuration source in go applications
Dynamic Configuration with Consul's Key/Value Store Feature

Installation

go get -u github.com/gizemcifguvercin/consul-go

Create Your Own Config

Match with the data model on Consul config json
Example:

package main

type ApplicationConfig struct {
	Salary string `json:"Salary"`
	Title  string `json:"Title"`
}

func NewApplicationConfig() ApplicationConfig {
	return ApplicationConfig{}
}

Usage

package main
import (
	Consul "github.com/gizemcifguvercin/consul-go"
	"github.com/jasonlvhit/gocron"
)
func main() {
	consulConfig := Consul.NewConsulConfig(5, "http://localhost:8500", "go", "")
	consulWatcher := Consul.NewConsulWatcher(&consulConfig)

	appConfig := NewApplicationConfig()
	go func() {
		gocron.Every(uint64(consulConfig.Interval)).Seconds().Do(consulWatcher.Watch, &appConfig)
		<-gocron.Start()
	}()
}


You can set some of Consul Config props with this order below;
Interval int
BaseUrl string
Prefix string
ACL string

This project is still developing. Feel free to give feedback or send pull request
Owner
Software Engineer https://medium.com/@gcifguvercin
null
Similar Resources

A shazam like tool to store songs fingerprints and retrieve them

A shazam like tool to store songs fingerprints and retrieve them

musig 🔈 A shazam-like tool that allows you to compute song's fingerprints and reverse lookup song names. It's more or less an implementation of the s

Dec 12, 2022

OpenDILab RL Object Store

Introduction Decision AI Store Installation Prerequisites Linux Python = 3.6 pip install . Quick Start Start Etcd Server di_store etcd_server ./conf/

Jan 6, 2023

A pizza store design using NATS pub sub queue.

A pizza store design using NATS pub sub queue.

A pizza store design using NATS pub sub queue.

Oct 12, 2022

A simple distributed key-value store by using hashicorp/raft

raftkv This repository holds a simple distributed key-value store by using hashicorp/raft. raftkv provides gRPC and HTTP APIs. Please take a look API

Nov 30, 2022

Inventory: Task 1 : Online Store

Task 1 : Online Store ### Q1: Describe what you think happened that caused those bad reviews during our 12.12 event and why it happened. Answer : You

Dec 6, 2021

Tapestry is an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate objects. This distributed system provides an interface for storing and retrieving key-value pairs.

Tapestry This project implements Tapestry, an underlying distributed object location and retrieval system (DOLR) which can be used to store and locate

Mar 16, 2022

A go implementation of the STUN client (RFC 3489 and RFC 5389)

go-stun go-stun is a STUN (RFC 3489, 5389) client implementation in golang (a.k.a. UDP hole punching). RFC 3489: STUN - Simple Traversal of User Datag

Jan 5, 2023

A QUIC implementation in pure go

A QUIC implementation in pure go

A QUIC implementation in pure Go quic-go is an implementation of the QUIC protocol in Go. It implements the IETF QUIC draft-29 and draft-32. Version c

Jan 9, 2023

Fast RFC 5389 STUN implementation in go

STUN Package stun implements Session Traversal Utilities for NAT (STUN) [RFC5389] protocol and client with no external dependencies and zero allocatio

Nov 28, 2022
Related tags
Consul Load-Balancing made simple
Consul Load-Balancing made simple

Notes From release 1.5.15 onward, fabio changes the default GOGC from 800 back to the golang default of 100.

Dec 27, 2022
Consul Load-Balancing made simple
Consul Load-Balancing made simple

Notes From release 1.5.15 onward, fabio changes the default GOGC from 800 back to the golang default of 100. Apparently this made some sense back in t

Dec 31, 2022
golang consul tools

中文文档 consult A consul key/value tool for golang Usage install go get -u github.com/xxjwxc/consult@master New Config conf := consulkv.NewConfig() With

Mar 6, 2022
Service registration and discovery, support etcd, zookeeper, consul, etc.

discox 支持类型 zookeeper etcd consul 示例 zookeeper server package main import ( "fmt" "github.com/goeasya/discox" "os" ) func main() { cfg := discox

Aug 31, 2022
Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Nov 7, 2021
Kong and Consul Lab For Golang

Kong and Consul Lab Prerequisites docker Deploy Consul Server docker run -d -p 8500:8500 -p 8600:8600/udp --name=consul-server consul agent -server -u

Nov 25, 2021
Project Kebe is the open-source Snap Store implementation.

Introduction Kebe intends to be a full replacement for the Snap Store. Quickstart Once you have an environment setup (for instance using https://githu

Nov 9, 2022
Backend implementation using go, proto3 and gRPC for a mock online store

Backend implementation using go, proto3 and gRPC for a mock online store Ricardo RICO URIBE Tasks I - Order service The current system exposes a produ

Oct 10, 2021
A consistent distributed data store.
A consistent distributed data store.

Doozer What Is It? Doozer is a highly-available, completely consistent store for small amounts of extremely important data. When the data changes, it

Jan 6, 2023
In memory Key/Value store in go using gRPC.
In memory Key/Value store in go using gRPC.

In memory cache, using gRPC Contents About Running Server Local Docker Kubernetes Example Helm Terraform API Add Get GetByPrefix GetAllItems DeleteKey

Dec 26, 2022