package.dist.src.config.storage-configuration.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Client SDK for Momento services
The newest version!
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageClientConfiguration = void 0;
class StorageClientConfiguration {
constructor(props) {
this.loggerFactory = props.loggerFactory;
this.transportStrategy = props.transportStrategy;
this.retryStrategy = props.retryStrategy;
}
getLoggerFactory() {
return this.loggerFactory;
}
getTransportStrategy() {
return this.transportStrategy;
}
getRetryStrategy() {
return this.retryStrategy;
}
withClientTimeoutMillis(clientTimeoutMillis) {
return new StorageClientConfiguration({
loggerFactory: this.loggerFactory,
transportStrategy: this.transportStrategy.withClientTimeoutMillis(clientTimeoutMillis),
retryStrategy: this.retryStrategy,
});
}
withTransportStrategy(transportStrategy) {
return new StorageClientConfiguration({
loggerFactory: this.loggerFactory,
transportStrategy: transportStrategy,
retryStrategy: this.retryStrategy,
});
}
withRetryStrategy(retryStrategy) {
return new StorageClientConfiguration({
loggerFactory: this.loggerFactory,
transportStrategy: this.transportStrategy,
retryStrategy: retryStrategy,
});
}
}
exports.StorageClientConfiguration = StorageClientConfiguration;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1jb25maWd1cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbmZpZy9zdG9yYWdlLWNvbmZpZ3VyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBZ0VBLE1BQWEsMEJBQTBCO0lBS3JDLFlBQVksS0FBZ0M7UUFDMUMsSUFBSSxDQUFDLGFBQWEsR0FBRyxLQUFLLENBQUMsYUFBYSxDQUFDO1FBQ3pDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxLQUFLLENBQUMsaUJBQWlCLENBQUM7UUFDakQsSUFBSSxDQUFDLGFBQWE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