Client is a memcache client. It is safe for unlocked use by multiple concurrent goroutines.
| 133 | // Client is a memcache client. |
| 134 | // It is safe for unlocked use by multiple concurrent goroutines. |
| 135 | type Client struct { |
| 136 | // DialContext connects to the address on the named network using the |
| 137 | // provided context. |
| 138 | // |
| 139 | // To connect to servers using TLS (memcached running with "--enable-ssl"), |
| 140 | // use a DialContext func that uses tls.Dialer.DialContext. See this |
| 141 | // package's tests as an example. |
| 142 | DialContext func(ctx context.Context, network, address string) (net.Conn, error) |
| 143 | |
| 144 | // Timeout specifies the socket read/write timeout. |
| 145 | // If zero, DefaultTimeout is used. |
| 146 | Timeout time.Duration |
| 147 | |
| 148 | // MaxIdleConns specifies the maximum number of idle connections that will |
| 149 | // be maintained per address. If less than one, DefaultMaxIdleConns will be |
| 150 | // used. |
| 151 | // |
| 152 | // Consider your expected traffic rates and latency carefully. This should |
| 153 | // be set to a number higher than your peak parallel requests. |
| 154 | MaxIdleConns int |
| 155 | |
| 156 | selector ServerSelector |
| 157 | |
| 158 | mu sync.Mutex |
| 159 | freeconn map[string][]*conn |
| 160 | } |
| 161 | |
| 162 | // Item is an item to be got or stored in a memcached server. |
| 163 | type Item struct { |
nothing calls this directly
no outgoing calls
no test coverage detected