MCPcopy
hub / github.com/scality/cloudserver / getScalityKms

Function getScalityKms

lib/kms/wrapper.js:24–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22} = require('arsenal/build/lib/network/KMSInterface');
23
24function getScalityKms() {
25 let scalityKMS;
26 let scalityKMSImpl;
27
28 try {
29 const ScalityKMS = require('scality-kms');
30 scalityKMS = new ScalityKMS(config.kms);
31 scalityKMSImpl = 'scalityKms';
32 } catch (error) {
33 logger.warn('scality kms unavailable. ' +
34 'Using file kms backend unless mem specified.',
35 { error });
36 scalityKMS = file;
37 scalityKMSImpl = 'fileKms';
38 }
39 return { scalityKMS, scalityKMSImpl };
40}
41
42const kmsFactory = {
43 mem: () => ({ client: inMemory, implName: 'memoryKms' }),

Callers 1

wrapper.jsFile · 0.85

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected