Categorygithub.com/thewizardplusplus/go-exercises-worker

# README

go-exercises-worker

GoDoc Go Report Card Build Status codecov

Background worker of the service for solving programming exercises.

Features

  • interaction with queues:
    • common properties:
      • automatic declaring of the used queues;
      • passing of a message data in JSON;
    • operations:
      • consuming of the solutions:
        • concurrent handling;
        • once requeue the solution on failure;
      • producing of the solution results:
        • generating of the custom message ID;
  • solution runners:
  • tools:
    • script for generating the allowed import configuration.

Installation

Prepare the directory:

$ mkdir --parents "$(go env GOPATH)/src/github.com/thewizardplusplus/"
$ cd "$(go env GOPATH)/src/github.com/thewizardplusplus/"

Clone this repository:

$ git clone https://github.com/thewizardplusplus/go-exercises-worker.git
$ cd go-exercises-worker

Install dependencies with the dep tool:

$ dep ensure -vendor-only

Build the project:

$ go install ./...

Usage

$ go-exercises-backend

Environment variables:

  • ALLOWED_IMPORT_CONFIG — path to the allowed import config (default: ./configs/allowed_imports.json);
  • RUNNING_TIMEOUT — maximal duration of solution running (default: 10s);
  • message broker:
    • MESSAGE_BROKER_ADDRESSRabbitMQ connection URI (default: amqp://rabbitmq:rabbitmq@localhost:5672);
    • MESSAGE_BROKER_BUFFER_SIZERabbitMQ channel capacity (default: 1000);
  • SOLUTION_CONSUMER_CONCURRENCY — amount of solution consumer threads (default: 1000).

API Description

API description in the AsyncAPI format: docs/async_api.yaml.

License

The MIT License (MIT)

Copyright © 2021-2022 thewizardplusplus

# Packages

No description provided by the author
No description provided by the author
No description provided by the author