github.com/kaydxh/golang@v0.0.131/pkg/database/redis/redis.proto (about) 1 syntax = "proto3"; 2 3 package go.pkg.database.redis; 4 import "google/protobuf/duration.proto"; 5 6 option go_package = "github.com/kaydxh/golang/pkg/database/redis;redis"; 7 8 // https://github.com/go-redis/redis/blob/ce40cd942a72c4a93f9025047e6fd3f510700ab3/options.go 9 message Redis { 10 bool enabled = 1; 11 // Either a single address or a seed list of host:port addresses 12 // of cluster/sentinel nodes. 13 repeated string addresses = 2; 14 15 // Database to be selected after connecting to the server. 16 // Only single-node and failover clients. 17 int64 db = 3; 18 19 // Use the specified Username to authenticate the current connection 20 // with one of the connections defined in the ACL list when connecting 21 // to a Redis 6.0 instance, or greater, that is using the Redis ACL system. 22 string username = 4; 23 24 // Optional password. Must match the password specified in the 25 // requirepass server configuration option (if connecting to a Redis 5.0 26 // instance, or lower), or the User Password when connecting to a Redis 6.0 27 // instance, or greater, that is using the Redis ACL system. 28 string password = 5; 29 30 // Maximumumber of retries before giving up. 31 // Default is 3 retries. 32 int64 max_retries = 7; 33 34 // Minimum backoff between each retry. 35 // Default is 8 milliseconds; -1 disables backoff. 36 google.protobuf.Duration min_retry_backoff = 8; 37 // Maximum backoff between each retry. 38 // Default is 512 milliseconds; -1 disables backoff. 39 google.protobuf.Duration max_retry_backoff = 9; 40 // Dial timeout for establishing new connections. 41 // Default is 5 seconds. 42 google.protobuf.Duration dial_timeout = 10; 43 // Timeout for socket reads. If reached, commands will fail 44 // with a timeout instead of blocking. Use value -1 for no timeout and 0 for 45 // default. Default is 3 seconds. 46 google.protobuf.Duration read_timeout = 11; 47 // Timeout for socket writes. If reached, commands will fail 48 // with a timeout instead of blocking. 49 // Default is ReadTimeout. 50 google.protobuf.Duration write_timeout = 12; 51 52 // Maximum number of socket connections. 53 // Default is 10 connections per every available CPU as reported by 54 // runtime.GOMAXPROCS. 55 int64 pool_size = 13; 56 // Minimum number of idle connections which is useful when establishing 57 // new connection is slow. 58 int64 min_idle_conns = 14; 59 // Connection age at which client retires (closes) the connection. 60 // Default is to not close aged connections. 61 google.protobuf.Duration max_conn_age = 15; 62 // Amount of time client waits for connection if all connections 63 // are busy before returning an error. 64 // Default is ReadTimeout + 1 second. 65 google.protobuf.Duration pool_timeout = 16; 66 // Amount of time after which client closes idle connections. 67 // Should be less than server's timeout. 68 // Default is 5 minutes. -1 disables idle timeout check. 69 google.protobuf.Duration idle_timeout = 17; 70 // Frequency of idle checks made by idle connections reaper. 71 // Default is 1 minute. -1 disables idle connections reaper, 72 // but idle connections are still discarded by the client 73 // if IdleTimeout is set. 74 google.protobuf.Duration idle_check_frequency = 18; 75 76 // Only cluster clients. 77 int64 max_redirects = 19; 78 bool read_only = 20; 79 // Allows routing read-only commands to the closest master or slave node. 80 // This option only works with NewFailoverClusterClient. 81 bool route_by_latency = 21; 82 // Allows routing read-only commands to the random master or slave node. 83 // This option only works with NewFailoverClusterClient. 84 bool route_randomly = 22; 85 // Route all commands to slave read-only nodes. 86 87 // The sentinel master name. 88 // Only failover clients. 89 // The master name. 90 string master_name = 23; 91 92 google.protobuf.Duration max_wait_duration = 24; 93 google.protobuf.Duration fail_after_duration = 25; 94 }