Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/bug: Add JSON schema + add missing pool default init #121

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func (c *Config) InitDefaults() error {

if c.Pool == nil {
c.Pool = &pool.Config{}
c.Pool.InitDefaults()
}
c.Pool.InitDefaults()
nickdnk marked this conversation as resolved.
Show resolved Hide resolved

if c.TLS != nil { //nolint:nestif
if _, err := os.Stat(c.TLS.Key); err != nil {
Expand Down
56 changes: 56 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$id": "https://raw.githubusercontent.com/roadrunner-server/centrifuge/refs/heads/master/schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "All the valid configuration parameters for the Centrifugo plugin for RoadRunner.",
"type": "object",
"title": "roadrunner-centrifuge",
"additionalProperties": false,
nickdnk marked this conversation as resolved.
Show resolved Hide resolved
"properties": {
"proxy_address": {
"description": "The address of the Centrifugo proxy server.",
"type": "string",
"default": "tcp://127.0.0.1:30000"
},
"grpc_api_address": {
"description": "The address/port of the gRPC server API.",
"type": "string",
"default": "tcp://127.0.0.1:10000"
},
nickdnk marked this conversation as resolved.
Show resolved Hide resolved
"use_compressor": {
"description": "Whether to use gRPC gzip compressor.",
"type": "boolean",
"default": false
},
"version": {
"description": "Your application version.",
"type": "string",
"default": "v1.0.0"
},
"name": {
"description": "Your application name.",
"type": "string",
"default": "roadrunner",
"minLength": 1
},
nickdnk marked this conversation as resolved.
Show resolved Hide resolved
"pool": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
},
nickdnk marked this conversation as resolved.
Show resolved Hide resolved
"tls": {
"description": "TLS settings",
"type": "object",
"additionalProperties": false,
"properties": {
"cert": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/cert"
},
"key": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/http/refs/heads/master/schema.json#/$defs/SSL/properties/key"
}
},
"required": [
"cert",
"key"
]
}
nickdnk marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading