GithubHelp home page GithubHelp logo

platron-tech / pigeon Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 4.88 MB

REST Based Scheduler Service

License: MIT License

Go 96.72% Dockerfile 3.28%
go postgresql scheduler-service open-source pigeon

pigeon's Introduction

Pigeon

deploy docker-pull contributors go-version

Run directly

Get dependencies :
go build ./...

Build :
go build .

Execute :
./pigeon

At execution step you can get db.Connect(). This cause of necessary environment variables.
To pure execution, you should add environment variables in the sample_enc.list to your machine with your custom settings

Run with Docker

Direct pull from Docker Hub :
docker pull netaxtech/pigeon

Build Docker Image

Docker image build :
docker build -t pigeon .

Docker run :
docker run --name pigeon-scheduler -p 4040:4040 --env-file ./sample_env.list pigeon

Pigeon uses PostgeSQL for database and you have to one database on your machine.
To install PostgreSQL Db your machine docker image pull
docker pull postgres
create postgres docker image
docker run --name postgres-db -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpass -d postgres

Usage

Create Scheduled Task

Example Request

{
   "interval":1,
   "intervalType":"DAILY | SECOND",
   "sendAt":"22:19:00",
   "immediately":"true | false",
   "continuous":"true | false",
   "limit":3,
   "execution":{
      "targetUrl":"http://my.custom.link:8080/sub/dir",
      "type":"GET | POST",
      "body":{
         "key1":"value1",
         "key2":"value2"
      },
      "header":{
         "key1":"value1",
         "key2":"value2"
      }
   }
}

Example Response

{
    "TaskId": "a8194865-bdad-488b-a39b-3df95d68de1d"
}

Description :

Field Description Required
interval Time which between two task fire *
intervalType Which time interval for two task *
sendAt When will fire the first task
immediately Fire task when request come to service
(override sendAt for first fire)
limit How many task will fire
continuous Fires task every time
(overrides limit)
execution Target service details *
execution.targetUrl Target endpoint will trigger *
execution.type Request type *
execution.body Request body
(necessary if type is POST)
execution.header Request header *

pigeon's People

Contributors

emreerinc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.