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

Add check Redis connection #2

Closed
mcmikius opened this issue Dec 18, 2023 · 0 comments
Closed

Add check Redis connection #2

mcmikius opened this issue Dec 18, 2023 · 0 comments
Assignees

Comments

@mcmikius
Copy link
Contributor

Need to add a connection check with Redis

The function should take the Redis connection options and return check the connection result.

Connection options example:
hostname: String, port: Int = RedisConnection.Configuration.defaultPort, password: String? = nil, tlsConfiguration: TLSConfiguration? = nil, database: Int? = nil, pool: [PoolOptions](https://api.vapor.codes/redis/documentation/redis/redisconfiguration/pooloptions) = .init()
or
serverAddresses: [SocketAddress], password: String? = nil, tlsConfiguration: TLSConfiguration? = nil, tlsHostname: String? = nil, database: Int? = nil, pool: [PoolOptions](https://api.vapor.codes/redis/documentation/redis/redisconfiguration/pooloptions) = .init()
or
url: URL, tlsConfiguration: TLSConfiguration? = nil, pool: [PoolOptions](https://api.vapor.codes/redis/documentation/redis/redisconfiguration/pooloptions) = .init()
or
url string: String, tlsConfiguration: TLSConfiguration? = nil, pool: [PoolOptions](https://api.vapor.codes/redis/documentation/redis/redisconfiguration/pooloptions) = .init()

Result example:
{ "componentId": "dfd6cf2b-1b6e-4412-a0b8-f6f7797a60d2", "componentType": "datastore", "observedValue": 75, "status": "warn", "time": "2018-01-17T03:36:48Z", "output": "", "links": { "self": "http://api.example.com/dbnode/dfd6cf2b/health" } }

Need divides cases for data store and pub-sub mode

Also need add unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants