0.5.1-pre.006
This commit is contained in:
227
config/schemas/transport.config.schema.json
Normal file
227
config/schemas/transport.config.schema.json
Normal file
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://khadhroony.local/schemas/transport.config.schema.json",
|
||||
"title": "Khadhroony Solana transport configuration",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"active_profile",
|
||||
"profiles"
|
||||
],
|
||||
"properties": {
|
||||
"active_profile": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/profile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"non_empty_string": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"http_endpoint": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"enabled",
|
||||
"provider",
|
||||
"cluster",
|
||||
"url",
|
||||
"connect_timeout_ms",
|
||||
"request_timeout_ms",
|
||||
"max_idle_connections_per_host",
|
||||
"roles"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"provider": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"pattern": "^https?://"
|
||||
},
|
||||
"connect_timeout_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"request_timeout_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"max_idle_connections_per_host": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/endpoint_role"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ws_endpoint": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"enabled",
|
||||
"provider",
|
||||
"cluster",
|
||||
"url",
|
||||
"connect_timeout_ms",
|
||||
"request_timeout_ms",
|
||||
"unsubscribe_timeout_ms",
|
||||
"write_channel_capacity",
|
||||
"event_channel_capacity",
|
||||
"auto_reconnect",
|
||||
"roles"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"provider": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"cluster": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"pattern": "^wss?://"
|
||||
},
|
||||
"connect_timeout_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"request_timeout_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"unsubscribe_timeout_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"write_channel_capacity": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"event_channel_capacity": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"auto_reconnect": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/endpoint_role"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"endpoint_role": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"role",
|
||||
"enabled",
|
||||
"request_kinds",
|
||||
"priority",
|
||||
"requests_per_second",
|
||||
"burst_capacity",
|
||||
"max_concurrent_requests",
|
||||
"max_subscriptions",
|
||||
"pause_after_rate_limit_ms"
|
||||
],
|
||||
"properties": {
|
||||
"role": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"request_kinds": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
}
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requests_per_second": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"burst_capacity": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"max_concurrent_requests": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"max_subscriptions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pause_after_rate_limit_ms": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"http_endpoints",
|
||||
"ws_endpoints"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"http_endpoints": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/http_endpoint"
|
||||
}
|
||||
},
|
||||
"ws_endpoints": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/ws_endpoint"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user