An example of a round robin algorithm in Go that can be used for load balancing.
I suggest to use the following project structure for any microservice which usually is deployed using container image on kubernetes, exposes its core logic through HTTP or gRPC transport layers and interacts with other services using a message broker, such as kafka.
root/
├── cmd/
This gist includes two files, Makefile and the script.
Script downloads the protoc for a given os and arch, unzips the files to .bin
directory.
It won't download the zip file, if it was already downloaded.
Makefile provides gen-prot
entry point that ensures that protoc exists and generates the code from given proto files.
This setup ensures that the protoc and plugins versions are pinned and there is no need to donwload those tools manually.
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
--- === LLMProofreader === | |
--- | |
--- Proofread clipboard contents using Claude | |
--- | |
--- Place this file in the ~/.hammerspoon directory with the following structure | |
--- ── Spoons | |
--- └── LLMProofreader.spoon | |
--- └── init.lua | |
--- | |
--- To use, add the following lines to ~/.hammerspoon/init.lua: |