go[channels]: hot config reload with os signal

Imagine a scenario where you have a monolithic application which uses a config file to store information about log directories, cert dirs and other service information. As an example to it following config file (- it is taken and modified from Haaukins project which I work on- ) can be considered: host: http: myapplication.mrturkmen.com port: insecure: 8080 secure: 8081 tls: enabled: false certfile: "/home/mrturkmen/certs/cert.crt" certkey: "/home/mrturkmen/certs/cert.key" cafile: "/home/mrturkmen/certs/ca.crt" files: ova-directory: "/home/mrturkmen/ova" users-file: "/home/mrturkmen/configs/users.yml" exercises-file: "/home/mrturkmen/configs/exercises.yml" frontends-file: "/home/mrturkmen/configs/frontends.yml" prodmode: true vpn-service: grpc: "vpnservice.mrturkmen.com:4000" auth-key: random-auth-key sign-key: random-sign-key tls: enabled: true certfile: "/home/mrturkmen/certs/cert.crt" certkey: "/home/mrturkmen/certs/cert.key" cafile: "/home/mrturkmen/certs/ca.crt" In this config file we have some set of keys which are defined to be used inside the application, however let’s say we would like to update some values from the config file. Then in normal cases (-if no hot reload kind of function implemented- ), user needs to restart entire application. It means application will have some down time, it may be less or more however it is not good way of doing it, in particular to update only a value from config file. ...

April 18, 2021 · 3 min · mrturkmen

go: concurrency notes

Concurrency in Go Concurrency in Go, makes Go programming language very unique and attractive compared to other languages, in this section I am going to share the notes which I took when I was watching coursera video series. If you did not already check previous post on Go, it could be helpful to check it out first. Go Notes (OOP) Specialization serie is Programming with Google Go ...

June 13, 2020 · 11 min · mrturkmen

go: object oriented programming notes

In this post, I would like to share the notes that I took when I was completing following Go series education on Coursera. I can recommend it for anyone who would like to get rapid introduction to Go programming. Programming with Google Go I should admit that although it looks fancy, nothing can be compared to actual development and contribution to open source projects. The course itself is quite interesting and contains very handy exercises regarding to Go development mentality. I would recommend it for anyone who has some interest in Go development and do not know where to start. ...

June 8, 2020 · 8 min · mrturkmen