Categorygithub.com/uniwise/parrot
modulepackage
0.5.3-rc.4
Repository: https://github.com/uniwise/parrot.git
Documentation: pkg.go.dev

# README

Parrot logo

Parrot the POEditor pull-through cache


This cache makes it possible to pull app translations directly from POEditor instead of compiling them into your app. This means no more re-builds every time translations are updated!

Features

  • Battle tested: The software is in active use on the WISEflow platform with high request rates daily.
  • All the formats: Parrot can provide all formats supported by POEditor.
  • Cache choices: Parrot comes with a Filesystem and Redis cache to facilitate single app deployments and highly distributed deployments.
  • OpenAPI: The Parrot API has been documented in OpenAPI specification which can be found in the doc/ directory.
  • Easy deployment: A docker image and helm chart is provided.

Configuration

The server can be configured with a yaml configuration file specified with the --config option. Every configuration can be overridden with an environment variable, where dots are replaced by underscores, such that API_TOKEN=xxx will set the api.token value

keydescriptiontypedefault
server.portport for the main http serverint80
server.gracePeriodgrace period for the http server to shutdownduration10s
log.levellog levelstringinfo
log.formatformat of the log. Can be "text" or "json"stringjson
cache.typetype of cache to use for translationsstringfilesystem
cache.ttltime to live for cache itemsduration1h
cache.renewalThresholdthreshold at which the server will preemptively fetch a new translationduration30m
cache.filesystem.dirdirectory of the filesystem cachestringdefault user cache directory
cache.redis.modemode of the redis connection to back the redis cache. "single" or "sentinel"stringsingle
cache.redis.addressaddress of the redis server, in case the single mode is usedstring
cache.redis.usernameusername to authenticate against redisstring
cache.redis.passwordpassword for redis authenticationstring
cache.redis.maxRetriesmax retries for redis client to connect to redis. Set to -1 for infinityint-1
cache.redis.dbredis db indexint1
cache.redis.sentinel.mastermaster name for sentinel setupstring
cache.redis.sentinel.addresseslist of sentinel addresses[]string
cache.redis.sentinel.passwordpassword for authenticating against sentinel instancesstring
prometheus.enabledenable prometheus metricsbooleantrue
prometheus.pathexpose prometheus metrics under pathstring/metrics
prometheus.portport to expose the prometheus metrics underint9090
api.tokensecret token to authenticating against poeditorstring

API specification

The REST API of Parrot is documented in the OpenAPI format. The specification file can be found here docs/api.yml and a Swagger UI is available here uniwise.github.io/parrot.

License

Parrot is available under the Apache 2 license.

This project uses open source components which have additional licensing terms.

# Packages

Copyright © 2021 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
No description provided by the author