Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: filter/readonly/filter.go

Issue 2993033002: [dsreadonly] Add read-only datastore filter. (Closed)
Patch Set: Rename to "readonly" Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | filter/readonly/filter_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/readonly/filter.go
diff --git a/filter/readonly/filter.go b/filter/readonly/filter.go
new file mode 100644
index 0000000000000000000000000000000000000000..d3e77f66c2f851cd0c320531d7605b4c05e5b7a7
--- /dev/null
+++ b/filter/readonly/filter.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The LUCI Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package readonly implements a filter that enforces read-only accesses to
+// services.
+//
+// This can be useful in hybrid environments where one cluster wants to read
+// from a cache-backed datastore, but cannot modify the cache, so reads are safe
+// and direct, but writes would create a state where the cached values are
+// invalid.
+//
+// This happens when mixing AppEngine datastore/memcache with Cloud Datastore
+// readers.
+package readonly
« no previous file with comments | « no previous file | filter/readonly/filter_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698