Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
06a92899
Commit
06a92899
authored
Aug 20, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: document about proxy method forwarding
parent
3db51a89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
ee/lib/elastic/multi_version_util.rb
ee/lib/elastic/multi_version_util.rb
+13
-0
No files found.
ee/lib/elastic/multi_version_util.rb
View file @
06a92899
...
...
@@ -36,6 +36,19 @@ module Elastic
klass
<
ActiveRecord
::
Base
?
klass
.
base_class
:
klass
end
# Handles which method calls should be forwarded to all targets,
# and which calls should be forwarded to just one target.
#
# This first sets up forwarding for methods which should go to all targets.
# This is specified by implementing `methods_for_all_write_targets`.
# Examples include document indexing/updating operations.
#
# Then other methods are forwarded to just the single read target.
# Examples include user searches.
#
# Special write operations specified in `methods_for_one_write_target` are left out.
# The caller must always specify the version the call should be triggered.
# Examples include deleting the whole index.
def
generate_forwarding
methods_for_all_write_targets
=
elastic_writing_targets
.
first
.
real_class
.
methods_for_all_write_targets
methods_for_one_write_target
=
elastic_writing_targets
.
first
.
real_class
.
methods_for_one_write_target
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment