radix-job-scheduler-server

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

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 16 Imported by: 0

README

Radix job scheduler server

This project is now archived - 2023.11.13

This repository is not longer in use, code merged into radix-job-scheduler

The job scheduler server for application jobs

Usage

Request from application container URLs

  • POST http://<job-name>:8080/api/v1/jobs - start new job
  • GET http://<job-name>:8080/api/v1/jobs - get job list
  • GET http://<job-name>:8080/api/v1/jobs/<job-name> - get job status
  • DELETE http://<job-name>:8080/api/v1/jobs/<job-name> - stop and delete job

Developing

You need Go installed. Make sure GOPATH and GOROOT are properly set up.

Also needed:

  • go-swagger (on a Mac, you can install it with Homebrew: brew install go-swagger)
  • statik (install with go get github.com/rakyll/statik)

Clone the repo into your GOPATH and run go mod download.

Update version

We follow the semantic version as recommended by go. radix-job-scheduler-server has three places to set version

  • apiVersionRoute in router/server.go and BasePathin docs/docs.go - API version, used in API's URL

  • Version in docs/docs.go - indicates changes in radix-job-scheduler-server logic - to see (e.g in swagger), that the version in the environment corresponds with what you wanted

    Run following command to update version in swagger.json

    make swagger
    
  • If generated file swagger.json is changed (methods or structures) - copy it to the public site

Custom configuration

By default Info and Error messages are logged. This can be configured via environment variable LOG_LEVEL (pods need to be restarted after changes)

  • LOG_LEVEL=ERROR - log only Error messages
  • LOG_LEVEL=INFO or not set - log Info and Error messages
  • LOG_LEVEL=WARNING or not set - log Info, Warning and Error messages
  • LOG_LEVEL=DEBUG - log Debug, Warning, Info and Error messages

By default swagger UI is not available. This can be configured via environment variable USE_SWAGGER

  • USE_SWAGGER=true - allows to use swagger UI with URL <api-endpoint>/swaggerui

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
Package docs Radix job scheduler server.
Package docs Radix job scheduler server.
Package swaggerui Needed for dynamically generate swagger documentation from make file using swagger + statik
Package swaggerui Needed for dynamically generate swagger documentation from make file using swagger + statik

Jump to

Keyboard shortcuts

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