Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASS: ${{secrets.GPG_PASS}}
CGO_ENABLED: 0
GOEXPERIMENT: greenteagc
LDFLAGS: >-
-s
-X github.com/roadrunner-server/roadrunner/v2025/internal/meta.version=${{ steps.values.outputs.version }}
Expand Down
45 changes: 43 additions & 2 deletions .rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,18 @@ http:
# Default: 128
max_concurrent_streams: 128

# HTTP/3 settings (experimental). Enable QUIC + HTTP/3 on a separate (optional) address.
# Provide key+cert here if ACME is not configured (same as for the TLS section above).
http3:
# Host and port to listen on for HTTP/3.
#
# Default: disabled (section absent)
address: 127.0.0.1:8443
# Path to the certificate (must be provided together with the key if section enabled).
# cert: "/ssl/cert.crt"
# Path to the private key.
# key: "/ssl/key.pem"

# Redis section.
redis:
# UniversalClient is an abstract client which - based on the provided options -
Expand Down Expand Up @@ -964,6 +976,15 @@ redis:
idle_check_freq: 0s # accepted values [1s, 5m, 3h]
read_only: false

# Optional TLS configuration for Redis (leave section absent to disable TLS).
# tls:
# # Path to the CA certificate (required if section enabled).
# root_ca: "/ssl/ca.crt"
# # (Optional) Client certificate + key if mTLS required.
# # cert: "/ssl/cert.crt"
# # key: "/ssl/key.pem"
# # client_auth_type: no_client_certs

# Application metrics in Prometheus format (docs: https://roadrunner.dev/docs/plugins-metrics/2.x/en). Drop this section
# for this feature disabling.
metrics:
Expand Down Expand Up @@ -1005,6 +1026,12 @@ status:
# Default: 503
unavailable_status_code: 503

# Maximum duration (in seconds) to wait for a complete response from the queried plugin(s).
# If the plugin does not respond within this time RR returns `unavailable_status_code`.
#
# Default: 60
check_timeout: 60

# Automatically detect PHP file changes and reload connected services
# (docs: https://roadrunner.dev/docs/plugins-reload/2.x/en). Drop this section for this feature disabling.
reload:
Expand Down Expand Up @@ -1671,6 +1698,10 @@ jobs:
# Optional, default is chosen in the order preferred based on broker support. Possible values: gzip, snappy, lz4, zstd.
compression_codec: gzip

# Partitioning strategy to use. Possible values: Manual, Uniform, RoundRobin, LeastBackup, Sticky.
# Default (if omitted): Uniform
partitioning_strategy: Uniform

# Kafka Consumer options. Needed to consume messages from the Kafka cluster.
#
# Optional, needed only if `consume` is used.
Expand Down Expand Up @@ -1765,6 +1796,16 @@ jobs:
# Optional, default: false.
block_rebalance_on_poll: true

# InstanceID switches the group member from dynamic to static membership.
# Optional.
# instance_id: rr-instance-1

# SASL options specific for this pipeline (optional). If omitted, global driver SASL settings are used.
sasl_options:
mechanism: plain
username: foo
password: bar

# list of pipelines to be consumed by the server automatically at the start, keep empty if you want to start consuming manually
consume:
[
Expand Down Expand Up @@ -2067,8 +2108,8 @@ centrifuge:

# gRPC server API address (docs: https://centrifugal.dev/docs/server/server_api#grpc-api)
#
# Optional, default: tcp://127.0.0.1:30000. Centrifugo: `grpc_api` should be set to true and `grpc_port` should be the same as in the RR's config.
grpc_api_address: tcp://127.0.0.1:30000
# Optional, default: tcp://127.0.0.1:10000. Centrifugo: `grpc_api` should be set to true and `grpc_port` should match this value.
grpc_api_address: tcp://127.0.0.1:10000

# Use gRPC gzip compressor
#
Expand Down
38 changes: 38 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Repository Guidelines

This guide helps contributors work efficiently on the RoadRunner core (Go) CLI and runtime.

## Project Structure & Module Organization
- `cmd/rr/`: CLI entrypoint (`main.go`) and basic CLI tests.
- `internal/`: CLI commands, debug helpers, metadata, RPC, service wiring.
- `lib/`: Public Go API to embed and control RoadRunner (`RR` type).
- `schemas/`: YAML schemas and config examples; `.rr.yaml` at repo root.
- `benchmarks/`, `container/`: Performance samples and container settings.
- Tests live alongside code as `*_test.go` files.

## Build, Test, and Development Commands
- `make build` — build the `rr` binary to `./rr`.
- `make test` — run `go test -v -race ./...` across modules.
- `./rr serve -c .rr.yaml` — run locally with the sample config.
- `dlv debug cmd/rr/main.go -- serve -c .rr-sample-bench-http.yaml` — debug run (needs Delve).
- `golangci-lint run` — lint/format per `.golangci.yml` (install locally).

## Coding Style & Naming Conventions
- Go 1.x standards: `gofmt`/`goimports`; tabs; 120‑char lines (see linter config).
- Package names: short, lower‑case; exported identifiers use Go’s `UpperCamelCase`.
- Errors: wrap with `%w`; prefer sentinel/typed errors; no panics in library code.
- Keep functions small; avoid globals (see `gochecknoglobals`); prefer context‑aware APIs.

## Testing Guidelines
- Use table‑driven tests; place in `*_test.go`. Call `t.Parallel()` where safe.
- Run with race detector and coverage: `go test -race -cover ./...`.
- Add tests for new CLI flags, config parsing, and plugin wiring. Keep fixtures minimal.

## Commit & Pull Request Guidelines
- Conventional commits: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`, `test:`, `ci:`.
- PRs must include: clear description, linked issues, test updates, and config/schema changes if applicable.
- Ensure `make test` and `golangci-lint run` pass; include usage examples for CLI‑related changes.

## Security & Configuration Tips
- Never commit secrets; prefer `.env` loaded via `DOTENV_PATH` or `--dotenv`.
- Debug server (`-d`) listens on `:6061`; avoid exposing in production.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ ENV LDFLAGS="-s \
-X github.com/roadrunner-server/roadrunner/v2025/internal/meta.version=$APP_VERSION \
-X github.com/roadrunner-server/roadrunner/v2025/internal/meta.buildTime=$BUILD_TIME"

# enable Go greentea GC experiment during build
ENV GOEXPERIMENT=greenteagc

# compile binary file
RUN set -x
RUN go mod download
Expand Down
Loading