Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/bygui86/go-config-hot-reload

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/bygui86/go-config-hot-reload


Version published
Created
Source

go-config-hot-reload

Explore configuration hot reloading options in Golang

run

file hot reload

# run application
go run ./file-hot-reload/main.go

# wait some seconds to have the application up and running

# edit config.yaml and change values

# pay attention to logs and notice that configurations are different now! 

consul

# start consul
docker run -d --rm --name=consul -e CONSUL_BIND_INTERFACE=eth0 -p 8500:8500 consul

# insert configs in consul
curl --request PUT \
    --data @./consul-reload/config-1.json \
    http://localhost:8500/v1/kv/samples/app

# run application
go run ./consul-reload/main.go

# wait some seconds to have the application up and running

# change a config
curl --request PUT \
    --data @./consul-reload/config-2.json \
    http://localhost:8500/v1/kv/samples/app

# pay attention to logs and notice that configurations are different now!
  • https://openmymind.net/Golang-Hot-Configuration-Reload/
  • https://medium.com/golangspec/sync-rwmutex-ca6c6c3208a0

consul

harvester

FAQs

Package last updated on 18 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc