Skip to content

nsmak/bannersRotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banners Rotation Build Status Go Report Card

Banner rotation service, based on UCB1 algorithm (multiarmed bandit).

Usage

With docker

Run

$ make run

Stop

$ make stop

Custom:

$ make build

or

$ make build-statistic

for build statistc sub service

Sample rotator service config.json:

{
  "logger": {
    "level": -1,
    "file_path": "./zap.log"
  },
  "rest_server": {
    "address": "rotator:8888"
  },
  "database": {
    "username": "postgres",
    "password": "password",
    "address": "db:5432",
    "db_name": "postgres"
  }
}

Sample statistic service config.json:

{
  "rabbit_mq": {
    "address": "mq:5672",
    "username": "guest",
    "password": "guest",
    "exchange_name": "stat_exchange",
    "exchange_type": "direct",
    "queue_name": "stat_queue",
    "routing_key": "stat_key",
    "consumer_tag": "stat_tag"
  },
  "logger": {
    "level": -1,
    "file_path": "./statistic.log"
  },
  "database": {
    "username": "postgres",
    "password": "password",
    "address": "db:5432",
    "db_name": "postgres"
  },
  "interval_in_sec": 60
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published