lint: lint yaml files

This commit is contained in:
Jimmy Zelinskie 2022-01-15 13:12:49 -05:00
parent c28d7ad788
commit e2991d59e4
6 changed files with 127 additions and 111 deletions

4
.github/FUNDING.yml vendored
View file

@ -1 +1,3 @@
github: [ jzelinskie ]
---
github:
- "jzelinskie"

View file

@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"

View file

@ -37,7 +37,7 @@ jobs:
- uses: "actions/checkout@v2"
- uses: "actions/setup-go@v2"
with:
go-version: ^1.17
go-version: "^1.17"
- name: "Install and configure chihaya"
run: |
go install ./cmd/chihaya
@ -62,7 +62,7 @@ jobs:
- uses: "actions/checkout@v2"
- uses: "actions/setup-go@v2"
with:
go-version: ^1.17
go-version: "^1.17"
- name: "Install and configure chihaya"
run: |
go install ./cmd/chihaya

11
.yamllint Normal file
View file

@ -0,0 +1,11 @@
# vim: ft=yaml
---
yaml-files:
- "*.yaml"
- "*.yml"
- ".yamllint"
ignore: "dist/helm/"
extends: "default"
rules:
quoted-strings: "enable"
line-length: "disable"

View file

@ -1,11 +1,12 @@
---
chihaya:
# The interval communicated with BitTorrent clients informing them how
# frequently they should announce in between client events.
announce_interval: 30m
announce_interval: "30m"
# The interval communicated with BitTorrent clients informing them of the
# minimal duration between announces.
min_announce_interval: 15m
min_announce_interval: "15m"
# The network interface that will bind to an HTTP endpoint that can be
# scraped by programs collecting metrics.
@ -30,14 +31,14 @@ chihaya:
tls_key_path: ""
# The timeout durations for HTTP requests.
read_timeout: 5s
write_timeout: 5s
read_timeout: "5s"
write_timeout: "5s"
# When true, persistent connections will be allowed. Generally this is not
# useful for a public tracker, but helps performance in some cases (use of
# a reverse proxy, or when there are few clients issuing many requests).
enable_keepalive: false
idle_timeout: 30s
idle_timeout: "30s"
# Whether to time requests.
# Disabling this should increase performance/decrease load.
@ -88,7 +89,7 @@ chihaya:
addr: "0.0.0.0:6969"
# The leeway for a timestamp on a connection ID.
max_clock_skew: 10s
max_clock_skew: "10s"
# The key used to encrypt connection IDs.
private_key: "paste a random string here that will be used to hmac connection IDs"
@ -113,17 +114,17 @@ chihaya:
# This block defines configuration used for the storage of peer data.
storage:
name: memory
name: "memory"
config:
# The frequency which stale peers are removed.
# This balances between
# - collecting garbage more often, potentially using more CPU time, but potentially using less memory (lower value)
# - collecting garbage less frequently, saving CPU time, but keeping old peers long, thus using more memory (higher value).
gc_interval: 3m
gc_interval: "3m"
# The amount of time until a peer is considered stale.
# To avoid churn, keep this slightly larger than `announce_interval`
peer_lifetime: 31m
peer_lifetime: "31m"
# The number of partitions data will be divided into in order to provide a
# higher degree of parallelism.
@ -131,7 +132,7 @@ chihaya:
# The interval at which metrics about the number of infohashes and peers
# are collected and posted to Prometheus.
prometheus_reporting_interval: 1s
prometheus_reporting_interval: "1s"
# This block defines configuration used for redis storage.
# storage:
@ -141,46 +142,46 @@ chihaya:
# # This balances between
# # - collecting garbage more often, potentially using more CPU time, but potentially using less memory (lower value)
# # - collecting garbage less frequently, saving CPU time, but keeping old peers long, thus using more memory (higher value).
# gc_interval: 3m
# gc_interval: "3m"
# # The interval at which metrics about the number of infohashes and peers
# # are collected and posted to Prometheus.
# prometheus_reporting_interval: 1s
# prometheus_reporting_interval: "1s"
# # The amount of time until a peer is considered stale.
# # To avoid churn, keep this slightly larger than `announce_interval`
# peer_lifetime: 31m
# peer_lifetime: "31m"
# # The address of redis storage.
# redis_broker: "redis://pwd@127.0.0.1:6379/0"
# # The timeout for reading a command reply from redis.
# redis_read_timeout: 15s
# redis_read_timeout: "15s"
# # The timeout for writing a command to redis.
# redis_write_timeout: 15s
# redis_write_timeout: "15s"
# # The timeout for connecting to redis server.
# redis_connect_timeout: 15s
# redis_connect_timeout: "15s"
# This block defines configuration used for middleware executed before a
# response has been returned to a BitTorrent client.
prehooks:
#- name: jwt
# - name: "jwt"
# options:
# issuer: "https://issuer.com"
# audience: "https://chihaya.issuer.com"
# jwk_set_url: "https://issuer.com/keys"
# jwk_set_update_interval: 5m
# jwk_set_update_interval: "5m"
#- name: client approval
# - name: "client approval"
# options:
# whitelist:
# - "OP1011"
# blacklist:
# - "OP1012"
#- name: interval variation
# - name: "interval variation"
# options:
# modify_response_probability: 0.2
# max_increase_delta: 60
@ -188,7 +189,7 @@ chihaya:
# This block defines configuration used for torrent approval, it requires to be given
# hashes for whitelist or for blacklist. Hashes are hexadecimal-encoaded.
#- name: torrent approval
# - name: "torrent approval"
# options:
# whitelist:
# - "a1b2c3d4e5a1b2c3d4e5a1b2c3d4e5a1b2c3d4e5"

View file

@ -1,11 +1,12 @@
---
global:
scrape_interval: 5s
evaluation_interval: 5s
scrape_interval: "5s"
evaluation_interval: "5s"
# A scrape configuration containing exactly one endpoint to scrape:
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'local-chihaya' # you can name this however you want
scrape_interval: 5s # optionally override the global scrape_interval
- job_name: "local-chihaya" # you can name this however you want
scrape_interval: "5s" # optionally override the global scrape_interval
static_configs:
- targets: ['localhost:6881'] # provide the address of chihaya's prometheus endpoint
- targets: ["localhost:6881"] # provide the address of chihaya's prometheus endpoint