appmesh 1.6.13__py3-none-any.whl → 1.6.15__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.
- appmesh/app.py +28 -18
- appmesh/client_http.py +434 -676
- appmesh/client_http_oauth.py +2 -2
- appmesh/client_tcp.py +158 -111
- appmesh/server_http.py +20 -23
- appmesh/server_tcp.py +4 -8
- appmesh/tcp_transport.py +0 -2
- {appmesh-1.6.13.dist-info → appmesh-1.6.15.dist-info}/METADATA +1 -1
- appmesh-1.6.15.dist-info/RECORD +16 -0
- appmesh-1.6.13.dist-info/RECORD +0 -16
- {appmesh-1.6.13.dist-info → appmesh-1.6.15.dist-info}/WHEEL +0 -0
- {appmesh-1.6.13.dist-info → appmesh-1.6.15.dist-info}/top_level.txt +0 -0
appmesh/app.py
CHANGED
@@ -134,75 +134,85 @@ class App:
|
|
134
134
|
|
135
135
|
# Application configuration
|
136
136
|
self.name = _get_str(data, "name")
|
137
|
-
"""
|
137
|
+
"""app name (unique)"""
|
138
138
|
self.command = _get_str(data, "command")
|
139
139
|
"""full command line with arguments"""
|
140
140
|
self.shell = _get_bool(data, "shell")
|
141
|
-
"""
|
141
|
+
"""Whether run command in shell mode (enables shell syntax such as pipes and compound commands)"""
|
142
142
|
self.session_login = _get_bool(data, "session_login")
|
143
|
-
"""
|
143
|
+
"""Whether to run the app in session login mode (inheriting the user's full login environment)"""
|
144
144
|
self.description = _get_str(data, "description")
|
145
|
-
"""
|
145
|
+
"""app description string"""
|
146
146
|
self.metadata = _get_item(data, "metadata")
|
147
|
-
"""metadata string/JSON (input for
|
147
|
+
"""metadata string/JSON (input for app, pass to process stdin)"""
|
148
148
|
self.working_dir = _get_str(data, "working_dir")
|
149
149
|
"""working directory"""
|
150
150
|
self.status = _get_int(data, "status")
|
151
|
-
"""
|
151
|
+
"""app status: 1 for enabled, 0 for disabled"""
|
152
152
|
self.docker_image = _get_str(data, "docker_image")
|
153
|
-
"""
|
153
|
+
"""Docker image for containerized execution"""
|
154
154
|
self.stdout_cache_num = _get_int(data, "stdout_cache_num")
|
155
|
-
"""stdout
|
155
|
+
"""maximum number of stdout log files to retain"""
|
156
156
|
self.start_time = _get_int(data, "start_time")
|
157
157
|
"""start date time for app (ISO8601 time format, e.g., '2020-10-11T09:22:05')"""
|
158
158
|
self.end_time = _get_int(data, "end_time")
|
159
159
|
"""end date time for app (ISO8601 time format, e.g., '2020-10-11T10:22:05')"""
|
160
|
-
self.
|
160
|
+
self.start_interval_seconds = _get_int(data, "start_interval_seconds")
|
161
161
|
"""start interval seconds for short running app, support ISO 8601 durations and cron expression (e.g., 'P1Y2M3DT4H5M6S' 'P5W' '* */5 * * * *')"""
|
162
162
|
self.cron = _get_bool(data, "cron")
|
163
|
-
"""
|
163
|
+
"""Whether the interval is specified as a cron expression"""
|
164
164
|
self.daily_limitation = App.DailyLimitation(_get_item(data, "daily_limitation"))
|
165
165
|
self.retention = _get_str(data, "retention")
|
166
166
|
"""extra timeout seconds for stopping current process, support ISO 8601 durations (e.g., 'P1Y2M3DT4H5M6S' 'P5W')."""
|
167
167
|
self.health_check_cmd = _get_str(data, "health_check_cmd")
|
168
168
|
"""health check script command (e.g., sh -x 'curl host:port/health', return 0 is health)"""
|
169
169
|
self.permission = _get_int(data, "permission")
|
170
|
-
"""
|
170
|
+
"""app user permission, value is 2 bit integer: [group & other], each bit can be deny:1, read:2, write: 3."""
|
171
171
|
self.behavior = App.Behavior(_get_item(data, "behavior"))
|
172
172
|
|
173
173
|
self.env = data.get("env", {}) if data else {}
|
174
174
|
"""environment variables (e.g., -e env1=value1 -e env2=value2, APP_DOCKER_OPTS is used to input docker run parameters)"""
|
175
175
|
self.sec_env = data.get("sec_env", {}) if data else {}
|
176
|
-
"""security environment variables, encrypt in server side with
|
176
|
+
"""security environment variables, encrypt in server side with app owner's cipher"""
|
177
177
|
self.pid = _get_int(data, "pid")
|
178
178
|
"""process id used to attach to the running process"""
|
179
179
|
self.resource_limit = App.ResourceLimitation(_get_item(data, "resource_limit"))
|
180
180
|
|
181
181
|
# Read-only attributes
|
182
|
+
self.register_time = _get_int(data, "register_time")
|
183
|
+
"""app register time"""
|
184
|
+
self.starts = _get_int(data, "starts")
|
185
|
+
"""number of times started"""
|
182
186
|
self.owner = _get_str(data, "owner")
|
183
|
-
"""owner name"""
|
187
|
+
"""owner name of app mesh user who created the app"""
|
184
188
|
self.user = _get_str(data, "pid_user")
|
185
|
-
"""process user name"""
|
189
|
+
"""process OS user name"""
|
186
190
|
self.pstree = _get_str(data, "pstree")
|
187
191
|
"""process tree"""
|
188
192
|
self.container_id = _get_str(data, "container_id")
|
189
|
-
"""container id"""
|
193
|
+
"""docker container id"""
|
190
194
|
self.memory = _get_int(data, "memory")
|
191
195
|
"""memory usage"""
|
192
196
|
self.cpu = _get_int(data, "cpu")
|
193
197
|
"""cpu usage"""
|
194
198
|
self.fd = _get_int(data, "fd")
|
195
199
|
"""file descriptor usage"""
|
200
|
+
self.stdout_cache_size = _get_int(data, "stdout_cache_size")
|
201
|
+
"""number of stdout log files currently retained"""
|
196
202
|
self.last_start_time = _get_int(data, "last_start_time")
|
197
203
|
"""last start time"""
|
198
204
|
self.last_exit_time = _get_int(data, "last_exit_time")
|
199
205
|
"""last exit time"""
|
206
|
+
self.last_error = _get_str(data, "last_error")
|
207
|
+
"""last error message"""
|
208
|
+
self.next_start_time = _get_int(data, "next_start_time")
|
209
|
+
"""next start time"""
|
200
210
|
self.health = _get_int(data, "health")
|
201
|
-
"""health status"""
|
211
|
+
"""health status: 0 for healthy, 1 for unhealthy"""
|
202
212
|
self.version = _get_int(data, "version")
|
203
|
-
"""version
|
213
|
+
"""app version"""
|
204
214
|
self.return_code = _get_int(data, "return_code")
|
205
|
-
"""last exit code"""
|
215
|
+
"""last process exit code"""
|
206
216
|
self.task_id = _get_int(data, "task_id")
|
207
217
|
"""current task id"""
|
208
218
|
self.task_status = _get_str(data, "task_status")
|