Documentation ¶
Overview ¶
This file contains code used to interact with Redis in Fabriktor. It follows the port and adapter approach.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
func NewAdapter ¶
func NewAdapter(l util.LoggerPort, FS embed.FS, host string, cfg RedisClientConfig) *Adapter
type RedisClientConfig ¶
RedisClientConfig represents the configuration for the Redis client.
type Socket ¶
Socket represents the configuration for the Redis socket.
Fields: - Port: The port number for the Redis connection. This is required. - UseTLS: A boolean flag indicating whether TLS is required for the connection.
- Set this to `true` to enable TLS. This will configure the client to use TLS when connecting to Redis.
- If `false`, no TLS will be used.
- MutualTLS: A boolean flag indicating whether mutual TLS is required for the connection.
- If `true`, both the client and server will authenticate each other using certificates.
- If `false`, only server-side TLS will be used (client will verify the server certificate but won't send its own).
- Cert: Path to the client certificate file (only required when MutualTLS is `true`). - Key: Path to the client key file (only required when MutualTLS is `true`). - CA: Path to the certificate authority file (required if MutualTLS is `true`).
Example: - To connect using TLS but without mutual authentication, set `UseTLS` to `true` and `MutualTLS` to `false`. - To connect without any TLS, set `UseTLS` to `false`.