{"repo":"flowerinthenight/kettle","free":true,"listed":false,"github":"https://github.com/flowerinthenight/kettle","clone":"git clone https://github.com/flowerinthenight/kettle.git","description":"A simple library to share workloads to a group of workers with one leader at any time. Built on top of Redis.","language":"Go","stars":16,"topics":["redis","go","golang","distributed-locking"],"license":"MIT","category":"databases-storage","readme_excerpt":"Overview kettle is a simple library that abstracts the use of distributed locking to elect a master among group of workers at a specified time interval. The elected master will then call the \"master\" function. This library uses Redis as the default distributed locker. How it works All workers that share the same name will attempt to grab a Redis lock to become the master. A provided master function will be executed by the node that successfully grabbed the lock. A single node works as well, in which case, that node will run both as master and a worker. The main changes in v2.x.x is the use of context for termination and an optional done channel for notification. It looks something like this: For version 0.x.x, it looks something like this: Environment variables Example A simple example is provided here for reference. Try running it simultaneously on multiple nodes.","default_branch":null,"files":null,"tree":[],"storefront":"/r/flowerinthenight","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/flowerinthenight/kettle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}