-
-
Notifications
You must be signed in to change notification settings - Fork 587
/
index.js
43 lines (35 loc) · 1.04 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* moleculer
* Copyright (c) 2019 MoleculerJS (https://github.com/moleculerjs/moleculer)
* MIT Licensed
*/
"use strict";
const Middlewares = {
ActionHook: require("./action-hook"),
Cacher: require("./cacher"),
Validator: require("./validator"),
Bulkhead: require("./bulkhead"),
ContextTracker: require("./context-tracker"),
CircuitBreaker: require("./circuit-breaker"),
Timeout: require("./timeout"),
Retry: require("./retry"),
Fallback: require("./fallback"),
ErrorHandler: require("./error-handler"),
Metrics: require("./metrics"),
Tracing: require("./tracing"),
Debounce: require("./debounce"),
Throttle: require("./throttle"),
HotReload: require("./hot-reload"),
Transmit: {
Encryption: require("./transmit/encryption"),
Compression: require("./transmit/compression")
},
Debugging: {
TransitLogger: require("./debugging/transit-logger"),
ActionLogger: require("./debugging/action-logger")
}
};
function register(name, value) {
Middlewares[name] = value;
}
module.exports = Object.assign(Middlewares, { register });