@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
52 lines • 1.49 kB
JavaScript
// SPDX-License-Identifier: Apache-2.0
import { ExportKubeConfigOptions } from './export-kubeconfig-options.js';
export class ExportKubeConfigOptionsBuilder {
_name;
_internal;
_kubeconfig;
constructor(_name = 'kind', _internal = false, _kubeconfig) {
this._name = _name;
this._internal = _internal;
this._kubeconfig = _kubeconfig;
}
static builder() {
return new ExportKubeConfigOptionsBuilder();
}
/**
* Set the name of the cluster (default "kind").
* @param name
*/
name(name) {
this._name = name;
return this;
}
/**
* Set whether to use internal or external address (default false).
* @param internal
*/
internal(internal) {
this._internal = internal;
return this;
}
/**
* Set the kubeconfig path (default $KUBECONFIG or $HOME/.kube/config).
* @param kubeconfig
*/
kubeconfig(kubeconfig) {
this._kubeconfig = kubeconfig;
return this;
}
/**
* Build the ExportLogsOptions instance.
*/
build() {
return new ExportKubeConfigOptions(this._name, this._internal, this._kubeconfig);
}
static from(options) {
if (!options) {
return new ExportKubeConfigOptionsBuilder();
}
return new ExportKubeConfigOptionsBuilder(options.name, options.internal, options.kubeconfig);
}
}
//# sourceMappingURL=export-kubeconfig-options-builder.js.map