Categorygithub.com/DoomSentinel/scheduler
modulepackage
0.0.0-20201130124959-1427ac778b8f
Repository: https://github.com/doomsentinel/scheduler.git
Documentation: pkg.go.dev

# README

SCHEDULER

This is a distributed scheduler based on RabbitMQ that allows you to execute tasks on specific time.

Supported task types

  • Remote http (POST/GET with specified body)
  • Local cmd
  • Dummy (for testing or just for notification callback)

Prerequisites

Please note limitations of MQ delayed messages that are applied same for this project, eg. task can be scheduled up to ~47days from its publication date

Installation

docker-compose up -d --build --remove-orphans

By default, service will be available on port 8245 via grpc, monitoring via grafana on port 3000. Raw prometheus metrics exposed on 0.0.0.0:8457/metrics. Both Grafana and Prometheus included for demonstration purposes.

If you want to run it locally after cloning repository create config.yaml from config.example.yaml in project root directory and run go run main.go

Generated API and *.proto files are available here

Project includes client package for external integrations

You can install example application by running

GO111MODULE=on go get github.com/DoomSentinel/scheduler/cmd/scheduler-example

Usage

  scheduler-example --host=0.0.0.0 --port=8245  

Configuration

Configuration passed by environment variables, defaults defined in config.example.yaml in project root

VariableDefaultDescription
API_GRPC_PORT8245Listen for for GRPC API
AMQP_HOST127.0.0.01RabbitMQ broker host
AMQP_PORT5672RabbitMQ broker port
AMQP_USERguestRabbitMQ auth user
AMQP_PASSWORDguestRabbitMQ auth password
MONITORING_PORT8457Port of http service where Prometheus metrics are exposed
DEBUG_DEBUGfalseEnables debug mode

Project maturity

Currently, not battle tested - therefore not ready for production usage. Needs more vespene gas tests.

# Packages

No description provided by the author
Package client is a generated GoMock package.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author