landing-aggregator

command module
v1.46.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

Landing Page Info Aggregator

Go Report Card Docker Pulls

Run in Postman

Micro-service which serves next:

Build

make help:
@echo "vendor      - Install govendor and sync vendored dependencies"
@echo "checkstyle  - executes bunch of checkstyle validators"
@echo "fmt         - formats the project"
@echo "test        - executes unit tests"
@echo "build       - builds binary"
@echo "docker      - Builds docker image"
@echo "clean       - Cleans build-related files from working directory"
@echo "release     - Builds docker container and pushes new version to DockerHUB"

Build image with name 'reportportal/landing-info':

make docker

To create container execute:

docker run --name landing-info -p 8080:8080 reportportal/landing-info

API

Aggregator exposes endpoints:

/ Returns all the cached and aggregated data including tweets from Twitter and GitHub-related info

/twitter Returns the feed cache from the Contentful CMS project as a Twitter-like feed. Includes only text fields.

/versions Returns latest versions of ReportPortal's Docker Images. Obtains this information from GitHUB API

Github aggregation details

/github/contribution Returns commits and unique contributors for the last weeks For example,

{
  "commits": {
    "1": 0,
    "4": 201,
    "12": 1018
  },
  "unique_contributors": {
    "1": 20,
    "4": 52,
    "12": 80
  }
}

means that there were no commits for the current week, 201 commits for the last 4 weeks, etc.

/github/stars Returns stars count for each repository and total count

/github/issues Aggregates issue statistics from each organization repository

Configuration

Aggregator can be configured through env variables. The following configuration options are available:

ENV VAR Default Value Description
PORT 8080 Application port
GITHUB_INCLUDE_BETA false Whether BETA versions should be included
GITHUB_TOKEN false GitHUB API Token
GOOGLE_API_KEY false Google API Key
YOUTUBE_BUFFER_SIZE 10 Number of videos to be cached
YOUTUBE_CHANNEL_ID Null YouTube channel ID
CONTENTFUL_TOKEN Null Contentful API Access Token
CONTENTFUL_SPACE_ID 1n1nntnzoxp4 Contentful Space ID
CONTENTFUL_LIMIT 15 Number of entries to be fetched and cached
MAILCHIMP_API_KEY Null MailChimp API Key
MAILCHIMP_USER landing-aggregator MailChimp User
MAILCHIMP_TIMEOUT_SECONDS 3 MailChimp Requests Timeout

Production deployment

Several instances of app should be deployed to provide fault-tolerance and distribute load. There is Traefik which is reverse-proxy and load-balancer which does not require any service registry and allows zero-conf discovery via Docker API. Example can be found here

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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