moat-kv 0.70.24__py3-none-any.whl → 0.71.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moat/kv/__init__.py +6 -7
- moat/kv/_cfg.yaml +5 -8
- moat/kv/actor/__init__.py +2 -1
- moat/kv/actor/deletor.py +4 -1
- moat/kv/auth/__init__.py +12 -13
- moat/kv/auth/_test.py +4 -1
- moat/kv/auth/password.py +11 -7
- moat/kv/backend/mqtt.py +4 -8
- moat/kv/client.py +20 -39
- moat/kv/code.py +3 -3
- moat/kv/command/data.py +4 -3
- moat/kv/command/dump/__init__.py +29 -29
- moat/kv/command/internal.py +2 -3
- moat/kv/command/job.py +1 -2
- moat/kv/command/type.py +3 -6
- moat/kv/data.py +9 -8
- moat/kv/errors.py +16 -8
- moat/kv/mock/__init__.py +2 -12
- moat/kv/model.py +28 -32
- moat/kv/obj/__init__.py +3 -3
- moat/kv/obj/command.py +3 -3
- moat/kv/runner.py +4 -5
- moat/kv/server.py +106 -126
- moat/kv/types.py +8 -6
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.6.dist-info}/METADATA +7 -6
- moat_kv-0.71.6.dist-info/RECORD +47 -0
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.6.dist-info}/WHEEL +1 -1
- moat_kv-0.71.6.dist-info/licenses/LICENSE +3 -0
- moat_kv-0.71.6.dist-info/licenses/LICENSE.APACHE2 +202 -0
- moat_kv-0.71.6.dist-info/licenses/LICENSE.MIT +20 -0
- moat_kv-0.71.6.dist-info/top_level.txt +1 -0
- build/lib/docs/source/conf.py +0 -201
- build/lib/examples/pathify.py +0 -45
- build/lib/moat/kv/__init__.py +0 -19
- build/lib/moat/kv/_cfg.yaml +0 -97
- build/lib/moat/kv/_main.py +0 -91
- build/lib/moat/kv/actor/__init__.py +0 -98
- build/lib/moat/kv/actor/deletor.py +0 -139
- build/lib/moat/kv/auth/__init__.py +0 -444
- build/lib/moat/kv/auth/_test.py +0 -166
- build/lib/moat/kv/auth/password.py +0 -234
- build/lib/moat/kv/auth/root.py +0 -58
- build/lib/moat/kv/backend/__init__.py +0 -67
- build/lib/moat/kv/backend/mqtt.py +0 -74
- build/lib/moat/kv/backend/serf.py +0 -45
- build/lib/moat/kv/client.py +0 -1025
- build/lib/moat/kv/code.py +0 -236
- build/lib/moat/kv/codec.py +0 -11
- build/lib/moat/kv/command/__init__.py +0 -1
- build/lib/moat/kv/command/acl.py +0 -180
- build/lib/moat/kv/command/auth.py +0 -261
- build/lib/moat/kv/command/code.py +0 -293
- build/lib/moat/kv/command/codec.py +0 -186
- build/lib/moat/kv/command/data.py +0 -265
- build/lib/moat/kv/command/dump/__init__.py +0 -143
- build/lib/moat/kv/command/error.py +0 -149
- build/lib/moat/kv/command/internal.py +0 -248
- build/lib/moat/kv/command/job.py +0 -433
- build/lib/moat/kv/command/log.py +0 -53
- build/lib/moat/kv/command/server.py +0 -114
- build/lib/moat/kv/command/type.py +0 -201
- build/lib/moat/kv/config.py +0 -46
- build/lib/moat/kv/data.py +0 -216
- build/lib/moat/kv/errors.py +0 -561
- build/lib/moat/kv/exceptions.py +0 -126
- build/lib/moat/kv/mock/__init__.py +0 -101
- build/lib/moat/kv/mock/mqtt.py +0 -159
- build/lib/moat/kv/mock/serf.py +0 -250
- build/lib/moat/kv/mock/tracer.py +0 -63
- build/lib/moat/kv/model.py +0 -1069
- build/lib/moat/kv/obj/__init__.py +0 -646
- build/lib/moat/kv/obj/command.py +0 -241
- build/lib/moat/kv/runner.py +0 -1347
- build/lib/moat/kv/server.py +0 -2809
- build/lib/moat/kv/types.py +0 -513
- debian/moat-kv/usr/lib/python3/dist-packages/docs/source/conf.py +0 -201
- debian/moat-kv/usr/lib/python3/dist-packages/examples/pathify.py +0 -45
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/__init__.py +0 -19
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/_cfg.yaml +0 -97
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/_main.py +0 -91
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/actor/__init__.py +0 -98
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/actor/deletor.py +0 -139
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/auth/__init__.py +0 -444
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/auth/_test.py +0 -166
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/auth/password.py +0 -234
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/auth/root.py +0 -58
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/__init__.py +0 -67
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/mqtt.py +0 -74
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/serf.py +0 -45
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/client.py +0 -1025
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/code.py +0 -236
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/codec.py +0 -11
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/__init__.py +0 -1
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/acl.py +0 -180
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/auth.py +0 -261
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/code.py +0 -293
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/codec.py +0 -186
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/data.py +0 -265
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/dump/__init__.py +0 -143
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/error.py +0 -149
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/internal.py +0 -248
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/job.py +0 -433
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/log.py +0 -53
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/server.py +0 -114
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/command/type.py +0 -201
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/config.py +0 -46
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/data.py +0 -216
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/errors.py +0 -561
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/exceptions.py +0 -126
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/__init__.py +0 -101
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/mqtt.py +0 -159
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/serf.py +0 -250
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/tracer.py +0 -63
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/model.py +0 -1069
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/obj/__init__.py +0 -646
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/obj/command.py +0 -241
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/runner.py +0 -1347
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/server.py +0 -2809
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/types.py +0 -513
- docs/source/conf.py +0 -201
- examples/pathify.py +0 -45
- moat/kv/backend/serf.py +0 -45
- moat/kv/codec.py +0 -11
- moat/kv/mock/serf.py +0 -250
- moat_kv-0.70.24.dist-info/RECORD +0 -137
- moat_kv-0.70.24.dist-info/top_level.txt +0 -9
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.6.dist-info}/licenses/LICENSE.txt +0 -0
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
moat
|
build/lib/docs/source/conf.py
DELETED
@@ -1,201 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
#
|
4
|
-
# Documentation build configuration file, created by
|
5
|
-
# sphinx-quickstart on Sat Jan 21 19:11:14 2017.
|
6
|
-
#
|
7
|
-
# This file is execfile()d with the current directory set to its
|
8
|
-
# containing dir.
|
9
|
-
#
|
10
|
-
# Note that not all possible configuration values are present in this
|
11
|
-
# autogenerated file.
|
12
|
-
#
|
13
|
-
# All configuration values have a default; values that are commented out
|
14
|
-
# serve to show the default.
|
15
|
-
|
16
|
-
# If extensions (or modules to document with autodoc) are in another directory,
|
17
|
-
# add these directories to sys.path here. If the directory is relative to the
|
18
|
-
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
19
|
-
#
|
20
|
-
import os
|
21
|
-
import sys
|
22
|
-
|
23
|
-
# So autodoc can import our package
|
24
|
-
sys.path.insert(0, os.path.abspath("../.."))
|
25
|
-
|
26
|
-
# Warn about all references to unknown targets
|
27
|
-
nitpicky = True
|
28
|
-
# Except for these ones, which we expect to point to unknown targets:
|
29
|
-
nitpick_ignore = [
|
30
|
-
# Format is ("sphinx reference type", "string"), e.g.:
|
31
|
-
("py:obj", "bytes-like"),
|
32
|
-
("py:class", "RangeSet"),
|
33
|
-
("py:class", "Any"),
|
34
|
-
]
|
35
|
-
|
36
|
-
autodoc_inherit_docstrings = False
|
37
|
-
|
38
|
-
# -- General configuration ------------------------------------------------
|
39
|
-
|
40
|
-
# If your documentation needs a minimal Sphinx version, state it here.
|
41
|
-
#
|
42
|
-
# needs_sphinx = '1.0'
|
43
|
-
|
44
|
-
# Add any Sphinx extension module names here, as strings. They can be
|
45
|
-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
46
|
-
# ones.
|
47
|
-
extensions = [
|
48
|
-
"sphinx.ext.autodoc",
|
49
|
-
"sphinx.ext.intersphinx",
|
50
|
-
"sphinx.ext.coverage",
|
51
|
-
"sphinx.ext.napoleon",
|
52
|
-
"sphinxcontrib_trio",
|
53
|
-
]
|
54
|
-
|
55
|
-
intersphinx_mapping = {
|
56
|
-
"python": ("https://docs.python.org/3", None),
|
57
|
-
"trio": ("https://trio.readthedocs.io/en/stable", None),
|
58
|
-
}
|
59
|
-
|
60
|
-
autodoc_member_order = "bysource"
|
61
|
-
|
62
|
-
# Add any paths that contain templates here, relative to this directory.
|
63
|
-
templates_path = []
|
64
|
-
|
65
|
-
# The suffix(es) of source filenames.
|
66
|
-
# You can specify multiple suffix as a list of string:
|
67
|
-
#
|
68
|
-
# source_suffix = ['.rst', '.md']
|
69
|
-
source_suffix = ".rst"
|
70
|
-
|
71
|
-
# The master toctree document.
|
72
|
-
master_doc = "index"
|
73
|
-
|
74
|
-
# General information about the project.
|
75
|
-
project = "MoaT-KV"
|
76
|
-
copyright = "The MoaT-KV authors"
|
77
|
-
author = "The MoaT-KV authors"
|
78
|
-
|
79
|
-
# The version info for the project you're documenting, acts as replacement for
|
80
|
-
# |version| and |release|, also used in various other places throughout the
|
81
|
-
# built documents.
|
82
|
-
#
|
83
|
-
# The short X.Y version.
|
84
|
-
import pkg_resources
|
85
|
-
|
86
|
-
version = pkg_resources.get_distribution("moat.kv")._version
|
87
|
-
|
88
|
-
# The full version, including alpha/beta/rc tags.
|
89
|
-
release = version
|
90
|
-
|
91
|
-
# The language for content autogenerated by Sphinx. Refer to documentation
|
92
|
-
# for a list of supported languages.
|
93
|
-
#
|
94
|
-
# This is also used if you do content translation via gettext catalogs.
|
95
|
-
# Usually you set "language" from the command line for these cases.
|
96
|
-
language = None
|
97
|
-
|
98
|
-
# List of patterns, relative to source directory, that match files and
|
99
|
-
# directories to ignore when looking for source files.
|
100
|
-
# This patterns also effect to html_static_path and html_extra_path
|
101
|
-
exclude_patterns = []
|
102
|
-
|
103
|
-
# The name of the Pygments (syntax highlighting) style to use.
|
104
|
-
pygments_style = "sphinx"
|
105
|
-
|
106
|
-
# The default language for :: blocks
|
107
|
-
highlight_language = "python3"
|
108
|
-
|
109
|
-
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
110
|
-
todo_include_todos = False
|
111
|
-
|
112
|
-
|
113
|
-
# -- Options for HTML output ----------------------------------------------
|
114
|
-
|
115
|
-
# The theme to use for HTML and HTML Help pages. See the documentation for
|
116
|
-
# a list of builtin themes.
|
117
|
-
#
|
118
|
-
# html_theme = 'alabaster'
|
119
|
-
|
120
|
-
# We have to set this ourselves, not only because it's useful for local
|
121
|
-
# testing, but also because if we don't then RTD will throw away our
|
122
|
-
# html_theme_options.
|
123
|
-
import sphinx_rtd_theme
|
124
|
-
|
125
|
-
html_theme = "sphinx_rtd_theme"
|
126
|
-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
127
|
-
|
128
|
-
# Theme options are theme-specific and customize the look and feel of a theme
|
129
|
-
# further. For a list of options available for each theme, see the
|
130
|
-
# documentation.
|
131
|
-
#
|
132
|
-
html_theme_options = {
|
133
|
-
# default is 2
|
134
|
-
# show deeper nesting in the RTD theme's sidebar TOC
|
135
|
-
# https://stackoverflow.com/questions/27669376/
|
136
|
-
# I'm not 100% sure this actually does anything with our current
|
137
|
-
# versions/settings...
|
138
|
-
"navigation_depth": 4,
|
139
|
-
"logo_only": True,
|
140
|
-
}
|
141
|
-
|
142
|
-
# Add any paths that contain custom static files (such as style sheets) here,
|
143
|
-
# relative to this directory. They are copied after the builtin static files,
|
144
|
-
# so a file named "default.css" will overwrite the builtin "default.css".
|
145
|
-
html_static_path = ["_static"]
|
146
|
-
|
147
|
-
|
148
|
-
# -- Options for HTMLHelp output ------------------------------------------
|
149
|
-
|
150
|
-
# Output file base name for HTML help builder.
|
151
|
-
htmlhelp_basename = "moat.kv-doc"
|
152
|
-
|
153
|
-
|
154
|
-
# -- Options for LaTeX output ---------------------------------------------
|
155
|
-
|
156
|
-
latex_elements = {
|
157
|
-
# The paper size ('letterpaper' or 'a4paper').
|
158
|
-
#
|
159
|
-
# 'papersize': 'letterpaper',
|
160
|
-
# The font size ('10pt', '11pt' or '12pt').
|
161
|
-
#
|
162
|
-
# 'pointsize': '10pt',
|
163
|
-
# Additional stuff for the LaTeX preamble.
|
164
|
-
#
|
165
|
-
# 'preamble': '',
|
166
|
-
# Latex figure (float) alignment
|
167
|
-
#
|
168
|
-
# 'figure_align': 'htbp',
|
169
|
-
}
|
170
|
-
|
171
|
-
# Grouping the document tree into LaTeX files. List of tuples
|
172
|
-
# (source start file, target name, title,
|
173
|
-
# author, documentclass [howto, manual, or own class]).
|
174
|
-
latex_documents = [
|
175
|
-
(master_doc, "moat.kv.tex", "Trio Documentation", author, "manual"),
|
176
|
-
]
|
177
|
-
|
178
|
-
|
179
|
-
# -- Options for manual page output ---------------------------------------
|
180
|
-
|
181
|
-
# One entry per manual page. List of tuples
|
182
|
-
# (source start file, name, description, authors, manual section).
|
183
|
-
man_pages = [(master_doc, "moat.kv", "MoaT-KV Documentation", [author], 1)]
|
184
|
-
|
185
|
-
|
186
|
-
# -- Options for Texinfo output -------------------------------------------
|
187
|
-
|
188
|
-
# Grouping the document tree into Texinfo files. List of tuples
|
189
|
-
# (source start file, target name, title, author,
|
190
|
-
# dir menu entry, description, category)
|
191
|
-
texinfo_documents = [
|
192
|
-
(
|
193
|
-
master_doc,
|
194
|
-
"moat.kv",
|
195
|
-
"MoaT-KV Documentation",
|
196
|
-
author,
|
197
|
-
"MoaT-KV",
|
198
|
-
"A distributed no-master key-value store",
|
199
|
-
"Miscellaneous",
|
200
|
-
),
|
201
|
-
]
|
build/lib/examples/pathify.py
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
#!/usr/bin/python3
|
2
|
-
|
3
|
-
# Batch-convert data. In this case I had some entries which were stored as
|
4
|
-
# a list, but using Path made much more sense (esp when you need to
|
5
|
-
# view/edit the yaml export).
|
6
|
-
|
7
|
-
import anyio
|
8
|
-
from moat.kv.client import open_client
|
9
|
-
from moat.util import P, yload, Path
|
10
|
-
import asyncclick as click
|
11
|
-
|
12
|
-
|
13
|
-
def conv(m, s: str) -> bool:
|
14
|
-
try:
|
15
|
-
d = m.value[s]
|
16
|
-
except KeyError:
|
17
|
-
return 0
|
18
|
-
if isinstance(d, Path):
|
19
|
-
return 0
|
20
|
-
if not isinstance(d, Sequence):
|
21
|
-
return 0
|
22
|
-
d = Path.build(d)
|
23
|
-
m.value[s] = d
|
24
|
-
return 1
|
25
|
-
|
26
|
-
|
27
|
-
@click.command()
|
28
|
-
@click.argument("path", type=P)
|
29
|
-
@click.argument("keys", type=str, nargs=-1)
|
30
|
-
async def main(path, keys):
|
31
|
-
if not keys:
|
32
|
-
keys = "src dest dst state".split()
|
33
|
-
with open("/etc/moat.kv.cfg") as cff:
|
34
|
-
cfg = yload(cff)
|
35
|
-
async with open_client(**cfg) as client:
|
36
|
-
async for m in client.get_tree(path, nchain=2):
|
37
|
-
n = 0
|
38
|
-
for k in keys:
|
39
|
-
n += conv(m, k)
|
40
|
-
if n:
|
41
|
-
await client.set(ORIG + m.path, value=m.value, chain=m.chain)
|
42
|
-
|
43
|
-
|
44
|
-
if __name__ == "__main__":
|
45
|
-
main()
|
build/lib/moat/kv/__init__.py
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# pylint: disable=W0703,C0103
|
2
|
-
from __future__ import annotations
|
3
|
-
|
4
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
5
|
-
|
6
|
-
try:
|
7
|
-
import warning
|
8
|
-
import pkg_resources # part of setuptools
|
9
|
-
|
10
|
-
with warnings.filterwarnings("ignore"):
|
11
|
-
_version = pkg_resources.require("moat.kv")[0].version
|
12
|
-
del pkg_resources
|
13
|
-
del warnings
|
14
|
-
|
15
|
-
_version_tuple = tuple(int(x) for x in _version.split("."))
|
16
|
-
|
17
|
-
except Exception: # pragma: no cover
|
18
|
-
_version = "0.0.1"
|
19
|
-
_version_tuple = (0, 0, 1)
|
build/lib/moat/kv/_cfg.yaml
DELETED
@@ -1,97 +0,0 @@
|
|
1
|
-
conn:
|
2
|
-
# client: controls how to talk to the MoaT-KV server
|
3
|
-
host: localhost
|
4
|
-
port: 27586
|
5
|
-
ssl: false
|
6
|
-
# ssl:
|
7
|
-
# cert: '/path/to/cert.pem',key='/path/to/cert.key'
|
8
|
-
init_timeout: 5
|
9
|
-
# time to wait for connection plus greeting
|
10
|
-
auth: null
|
11
|
-
# no auth used by default
|
12
|
-
name: null
|
13
|
-
# defaults to a seqnum
|
14
|
-
config:
|
15
|
-
prefix: !P :.moat.kv.config
|
16
|
-
errors:
|
17
|
-
prefix: !P :.moat.kv.error
|
18
|
-
codes:
|
19
|
-
prefix: !P :.moat.kv.code.proc
|
20
|
-
modules:
|
21
|
-
prefix: !P :.moat.kv.code.module
|
22
|
-
runner: # for moat.kv.runner.RunnerRoot
|
23
|
-
# storage for runnable commands
|
24
|
-
prefix: !P :.moat.kv.run"
|
25
|
-
# storage for runner states
|
26
|
-
state: !P :.moat.kv.state"
|
27
|
-
|
28
|
-
name: "run"
|
29
|
-
# Serf event name, suffixed by subpath
|
30
|
-
|
31
|
-
start_delay: 1
|
32
|
-
# time to wait between job starts. Not optional.
|
33
|
-
|
34
|
-
ping: -15
|
35
|
-
# set an I-am-running message every those-many seconds
|
36
|
-
# positive: set in moat.kv, negative: broadcast to :moat.kv.run tag
|
37
|
-
|
38
|
-
actor:
|
39
|
-
# Actor config, required for Runner
|
40
|
-
cycle: 20
|
41
|
-
nodes: -1
|
42
|
-
splits: 5
|
43
|
-
n_hosts: 3
|
44
|
-
version: 1
|
45
|
-
sub:
|
46
|
-
# tags for various runner modes
|
47
|
-
group: "any"
|
48
|
-
single: "at"
|
49
|
-
all: "all"
|
50
|
-
server:
|
51
|
-
# server-side configuration
|
52
|
-
buffer: 10
|
53
|
-
# per-stream buffer
|
54
|
-
|
55
|
-
backend: "mqtt"
|
56
|
-
# default
|
57
|
-
mqtt:
|
58
|
-
uri: "mqtt://localhost:1883"
|
59
|
-
serf:
|
60
|
-
host: "localhost"
|
61
|
-
port: 7373
|
62
|
-
|
63
|
-
# event message path/topic prefix
|
64
|
-
root: !P moat.kv
|
65
|
-
|
66
|
-
paranoia: False
|
67
|
-
# typecheck server-to-server updates?
|
68
|
-
#
|
69
|
-
# which addresses/ports to accept MoaT-KV connections on
|
70
|
-
bind: [{}]
|
71
|
-
bind_default:
|
72
|
-
# default values for all elements of "bind"
|
73
|
-
host: "localhost"
|
74
|
-
port: PORT
|
75
|
-
ssl: False
|
76
|
-
change:
|
77
|
-
length: 5
|
78
|
-
# chain length: use max nr of network sections +1
|
79
|
-
ping:
|
80
|
-
cycle: 10
|
81
|
-
gap: 2
|
82
|
-
# asyncserf.Actor config timing for server sync
|
83
|
-
# ping also controls minimum server startup time
|
84
|
-
delete:
|
85
|
-
# asyncserf.Actor config timing for deletion
|
86
|
-
cycle: 100
|
87
|
-
gap: 10
|
88
|
-
version: 1
|
89
|
-
paranoia: false
|
90
|
-
# typecheck server>server updates?
|
91
|
-
|
92
|
-
# how does a new server reach existing nodes, to download state?
|
93
|
-
domain: null
|
94
|
-
# domain in which to look up node names, if not in hostmap
|
95
|
-
hostmap: # map MoaT-KV server names to connect destinations
|
96
|
-
test1: ["localhost", 27586]
|
97
|
-
test2: ["does-not-exist.invalid", 27586]
|
build/lib/moat/kv/_main.py
DELETED
@@ -1,91 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
"""
|
3
|
-
Basic DistKV support
|
4
|
-
|
5
|
-
"""
|
6
|
-
|
7
|
-
from __future__ import annotations
|
8
|
-
|
9
|
-
import logging
|
10
|
-
|
11
|
-
import asyncclick as click
|
12
|
-
from moat.util import attrdict, combine_dict, load_subgroup, CFG, ensure_cfg
|
13
|
-
|
14
|
-
from moat.kv.auth import gen_auth
|
15
|
-
from moat.kv.client import client_scope
|
16
|
-
|
17
|
-
logger = logging.getLogger(__name__)
|
18
|
-
|
19
|
-
|
20
|
-
ensure_cfg("moat.kv")
|
21
|
-
|
22
|
-
|
23
|
-
class NullObj:
|
24
|
-
"""
|
25
|
-
This helper defers raising an exception until one of its attributes is
|
26
|
-
actually accessed.
|
27
|
-
"""
|
28
|
-
|
29
|
-
def __init__(self, exc):
|
30
|
-
self._exc = exc
|
31
|
-
|
32
|
-
def __call__(self, *a, **kw):
|
33
|
-
raise self._exc
|
34
|
-
|
35
|
-
def __await__(self):
|
36
|
-
raise self._exc
|
37
|
-
|
38
|
-
def __getattr__(self, k):
|
39
|
-
if k[0] == "_" and k not in ("_request", "_cfg"):
|
40
|
-
return object.__getattribute__(self, k)
|
41
|
-
raise self._exc
|
42
|
-
|
43
|
-
|
44
|
-
@load_subgroup(sub_pre="moat.kv.command", sub_post="cli", ext_pre="moat.kv", ext_post="_main.cli")
|
45
|
-
@click.option("-h", "--host", default=None, help=f"Host to use. Default: {CFG.kv.conn.host}")
|
46
|
-
@click.option(
|
47
|
-
"-p",
|
48
|
-
"--port",
|
49
|
-
type=int,
|
50
|
-
default=None,
|
51
|
-
help=f"Port to use. Default: {CFG.kv.conn.port}",
|
52
|
-
)
|
53
|
-
@click.option(
|
54
|
-
"-a",
|
55
|
-
"--auth",
|
56
|
-
type=str,
|
57
|
-
default=None,
|
58
|
-
help="Auth params. =file or 'type param=value…' Default: _anon",
|
59
|
-
)
|
60
|
-
@click.option("-m", "--metadata", is_flag=True, help="Include/print metadata.")
|
61
|
-
@click.pass_context
|
62
|
-
async def cli(ctx, host, port, auth, metadata):
|
63
|
-
"""The MoaT Key-Value subsystem.
|
64
|
-
|
65
|
-
All commands (except 'server' and 'dump') connect to a MoaT-KV server.
|
66
|
-
"""
|
67
|
-
obj = ctx.obj
|
68
|
-
cfg = attrdict()
|
69
|
-
if host is not None:
|
70
|
-
cfg.host = host
|
71
|
-
if port is not None:
|
72
|
-
cfg.port = port
|
73
|
-
|
74
|
-
if auth is not None:
|
75
|
-
cfg.auth = gen_auth(auth)
|
76
|
-
if obj.DEBUG:
|
77
|
-
cfg.auth._DEBUG = True
|
78
|
-
|
79
|
-
cfg = combine_dict(attrdict(kv=attrdict(conn=cfg)), obj.cfg, cls=attrdict)
|
80
|
-
|
81
|
-
obj.meta = 3 if metadata else False
|
82
|
-
|
83
|
-
try:
|
84
|
-
if ctx.invoked_subcommand in {None, "server", "dump"}:
|
85
|
-
obj.client = NullObj(RuntimeError("Not a client command"))
|
86
|
-
else:
|
87
|
-
obj.client = await client_scope(**cfg.kv)
|
88
|
-
except OSError as exc:
|
89
|
-
obj.client = NullObj(exc)
|
90
|
-
else:
|
91
|
-
logger.debug("Connected.")
|