createPlatformImpl()

in knative-build/runtimes/javascript/platform/platform.js [99:118]


    createPlatformImpl(id) {
        DEBUG.functionStart();
        DEBUG.dumpObject(id,"id");
        // Load the appropriate implementation module and return reference to it
        switch (id.toLowerCase()) {
            case PLATFORM_KNATIVE:
                const knPlatformImpl = require('./knative.js');
                this._platformImpl = new knPlatformImpl(this);
                break;
            case PLATFORM_OPENWHISK:
                const owPlatformImpl = require('./openwhisk.js');
                this._platformImpl = new owPlatformImpl(this);
                break;
            default:
                console.error("Platform ID is not a known value (" + id + ").");
        }
        DEBUG.dumpObject(this._platformImpl,"platformImpl");
        DEBUG.functionEnd();
        return this._platformImpl;
    }