flock

command module
v0.0.0-...-0e2bccd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 1 Imported by: 0

README

flock - Distributed Job Scheduler

📌 Introduction

Is your code taking too much time? Just flock it...

flock is a distributed system to run scheduled jobs against a server or a group of servers of any size. One of the machines is the leader and the others will be followers. If the leader fails or becomes unreachable, any other one will take over and reschedule all jobs to keep the system healthy.

🤖 Installation

make install-dev

👨‍💻️ Usage

flock up
# to specify file with desired config file
flock up -f `flock.json`

Configuration sources

Settings can be specified in three ways (in order of precedence):

  1. Command line arguments.
  2. Environment variables starting with FLOCK_
  3. flock.json config file

Config file will be loaded from the following paths:

$HOME/.flock/flock.json

Refer sample configuration file - flock.yml.

Description

Flock nodes can work in two modes, agents or servers.

A Flock agent is a cluster member that can handle job executions, run your scripts and return the resulting output to the server.

A Flock server is also a cluster member that send job execution queries to agents or other servers, so servers can execute jobs too.

Flock clusters have a leader, the leader is responsible of starting job execution queries in the cluster.

Any Flock agent or server acts as a cluster member and it's available to run scheduled jobs.

Default is for all nodes to execute each job. You can control what nodes run a job by specifying tags and a count of target nodes having this tag. This gives an unprecedented level of flexibility in runnig jobs across a cluster of any size and with any combination of machines you need.

All the execution responses will be gathered by the scheduler and stored in the database.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
sql

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL