-
Notifications
You must be signed in to change notification settings - Fork 460
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
TLS support #121
TLS support #121
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@bradfitz Ping. Can you please take a look at this and maybe merge it? It will be great to have TLS support for this client. |
I'd prefer a new exported field on Client, not a new constructor. Also, each server shard might have its own hostname/tls.Config. The option on Client should be more like Ideally there would be tests too. I tried to run it against memcached built with TLS enabled and I couldn't even get memcached on Debian stable to work. (I'm surprised it'd need anything newer, so I was likely holding it wrong but then ran out of time.) |
I've addressed this part. This package now has better tests & GitHub Actions CI hooked up. |
Turns out we don't actually need this since #158, @bruceesmith. That hook already provides everything necessary to do TLS dials. I sent #169 to add a test & mention in the docs. |
* Convert to string using rune() (bradfitz#123) See golang/go#32479 Fixes bradfitz#122. Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> * delete an unused type * feat: add support for append/prepend * Update README.md * memcache: add Client.Close method Updates bradfitz#155 from @renanbastos93 Co-authored-by: renanbastos93 <renanbastos.tec@gmail.com> * feat: support custom dialer * support custom DialContext * add minimal Go memcached server for tests * go.mod: bump minimum Go from 1.12 to Go 1.18 Go 1.18 is what's in Ubuntu 22.04 LTS (Jammy). The later Ubuntus have 1.19, 1.20, and 1.21 (the current Go release) Go 1.18 seems fine. Go 1.18 came out 2022-03-15, about 1.5 years ago. * docs(readme): update README.md * add AUTHORS file, adjust copyright headers Signed-off-by: Brad Fitzpatrick <brad@danga.com> * add start of GitHub Actions CI * README.md: remove some dated Go notes Signed-off-by: Brad Fitzpatrick <brad@danga.com> * run the three main test types in parallel Saves about six seconds overall, as each test currently involves a three second sleep. * add CompareAndSwap (cas) tests Signed-off-by: Brad Fitzpatrick <brad@danga.com> * Export Compare-And-Swap (CAS) id in Item Even though the CAS id is a transparent token there are use cases where the client of the module could be interested in storing the token from a retrieved Item out-of-process for later use with a CAS operation. This is impossible if the field is unexported. * raise DefaultTimeout from 100ms to 500ms Various memcached concentrator things (and things with disks) are more common now (and TLS implementations with more round-trips). The assumption of all memcached access being within the same rack/LAN might no longer be appropriate. Updates bradfitz#114 Signed-off-by: Brad Fitzpatrick <brad@danga.com> * add TLS integration test, update Client.DialContext docs Turns out we already have the necessary hook (DialContext), which was added in bradfitz#158. Updates bradfitz#121 Signed-off-by: Brad Fitzpatrick <brad@danga.com> * tweak tests * move validation --------- Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com> Signed-off-by: Brad Fitzpatrick <brad@danga.com> Co-authored-by: Robert-André Mauchin <30413512+eclipseo@users.noreply.github.com> Co-authored-by: Saimon Shaplygin <semyuon@gmail.com> Co-authored-by: Justin Vanderhooft <justinvdhooft@gmail.com> Co-authored-by: Friedrich42 <39532283+Friedrich42@users.noreply.github.com> Co-authored-by: Brad Fitzpatrick <brad@danga.com> Co-authored-by: renanbastos93 <renanbastos.tec@gmail.com> Co-authored-by: Irina Marchuk <mar4ukira@gmail.com> Co-authored-by: mingrammer <mingrammer@gmail.com> Co-authored-by: martins <martin.soderstrom@aurorainnovation.com>
Support of memcached TLS
Add support for the (experimental) TLS feature of memcached TLS
Function NewWithTLS(config *tls.Config, server ...string) *Client is added. Simply pass in a *tls.Config whose settings match those of the memcached daemon, then all other methods of gomemcache operate identically to those of the normal (non-TLS) case.