DC-140: network provider abstraction (src/network/) + tailscale provider + registry + tests
This commit is contained in:
7 files changed
+1308
No files matched your search
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* src/network entry point (DC-140).
|
||||
*
|
||||
* Registers the built-in providers with the registry on first require.
|
||||
* The WireGuard provider (DC-149) registers itself here when it lands.
|
||||
*
|
||||
* Usage (feature modules — the ONLY sanctioned import):
|
||||
* const { registry } = require('../network');
|
||||
* const provider = registry.getActiveProvider(); // throws if unset
|
||||
* if (registry.getCapabilities().invites) { ... }
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const registry = require('./registry');
|
||||
const { createTailscaleProvider } = require('./providers/tailscale');
|
||||
|
||||
registry.registerProvider('tailscale', createTailscaleProvider);
|
||||
|
||||
module.exports = {
|
||||
registry,
|
||||
errors: require('./errors'),
|
||||
CONTRACT_METHODS: require('./provider').CONTRACT_METHODS,
|
||||
};
|
||||
Reference in new issue
Block a user