/// <summary> /// Initializes a new instance of the <see cref="KubernetesPairingRecordStore"/> class. /// </summary> /// <param name="client"> /// A <see cref="KubernetesClient"/> which can be used to connect to the Kubernetes cluster. /// </param> /// <param name="logger"> /// A logger which can be used when logging.</param> public KubernetesPairingRecordStore(KubernetesClient client, ILogger <KubernetesPairingRecordStore> logger) { this.client = client ?? throw new ArgumentNullException(nameof(client)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.secretClient = this.client.GetClient <V1Secret>(); }
/// <summary> /// Initializes a new instance of the <see cref="KubernetesWebDriver"/> class. /// </summary> /// <param name="kubernetes"> /// A <see cref="KubernetesClient"/> which can be used to connect to Kubernetes. /// </param> /// <param name="logger"> /// A logger which can be used when logging. /// </param> public KubernetesWebDriver(KubernetesClient kubernetes, ILogger <KubernetesWebDriver> logger) { this.kubernetes = kubernetes ?? throw new ArgumentNullException(nameof(kubernetes)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.sessionClient = this.kubernetes.GetClient <WebDriverSession>(); }
/// <summary> /// Initializes a new instance of the <see cref="UsbmuxdSidecar"/> class. /// </summary> /// <param name="muxerClient"> /// A <see cref="MuxerClient"/> which represents a connection to the local iOS USB muxer. /// </param> /// <param name="kubernetes"> /// A <see cref="KubernetesClient"/> which represents a connection to the Kubernetes cluster. /// </param> /// <param name="pairingRecordProvisioner"> /// A <see cref="PairingRecordProvisioner"/> which can be used to retrieve or generate a pairing record. /// </param> /// <param name="developerDiskProvisioner"> /// A <see cref="DeveloperDiskProvisioner"/> which can be used to mount developer disk images on the device. /// </param> /// <param name="configuration"> /// A <see cref="UsbmuxdSidecarConfiguration"/> which represents the configuration for this sidecar. /// </param> /// <param name="logger"> /// A <see cref="ILogger"/> which can be used to log messages. /// </param> public UsbmuxdSidecar(MuxerClient muxerClient, KubernetesClient kubernetes, PairingRecordProvisioner pairingRecordProvisioner, DeveloperDiskProvisioner developerDiskProvisioner, UsbmuxdSidecarConfiguration configuration, ILogger <UsbmuxdSidecar> logger) { this.muxerClient = muxerClient ?? throw new ArgumentNullException(nameof(muxerClient)); this.kubernetesClient = kubernetes ?? throw new ArgumentNullException(nameof(kubernetes)); this.pairingRecordProvisioner = pairingRecordProvisioner ?? throw new ArgumentNullException(nameof(pairingRecordProvisioner)); this.developerDiskProvisioner = developerDiskProvisioner ?? throw new ArgumentNullException(nameof(developerDiskProvisioner)); this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.deviceClient = this.kubernetesClient.GetClient <MobileDevice>(); }
/// <summary> /// Initializes a new instance of the <see cref="ChildOperator{TParent, TChild}"/> class. /// </summary> /// <param name="kubernetes"> /// A connection to a Kubernetes cluster. /// </param> /// <param name="configuration"> /// The configuration for this operator. /// </param> /// <param name="parentFilter"> /// A delegate which can be used to only take a subset of the parents in consideration. /// </param> /// <param name="childFactory"> /// A method which projects objects of type <typeparamref name="TParent"/> into objects of type /// <typeparamref name="TChild"/>. /// </param> /// <param name="feedbackLoops"> /// A list of feedback loops which can update the state of the parent object depending /// on the state of the child object. /// </param> /// <param name="logger"> /// The logger to use when logging. /// </param> /// <param name="services"> /// A <see cref="IServiceProvider"/> which is passed to the feedback loops. /// </param> public ChildOperator( KubernetesClient kubernetes, ChildOperatorConfiguration configuration, Func <TParent, bool> parentFilter, Action <TParent, TChild> childFactory, Collection <FeedbackLoop <TParent, TChild> > feedbackLoops, ILogger <ChildOperator <TParent, TChild> > logger, IServiceProvider services) { this.kubernetes = kubernetes ?? throw new ArgumentNullException(nameof(kubernetes)); this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.parentFilter = parentFilter ?? throw new ArgumentNullException(nameof(parentFilter)); this.childFactory = childFactory ?? throw new ArgumentNullException(nameof(childFactory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.feedbackLoops = feedbackLoops ?? throw new ArgumentNullException(nameof(feedbackLoops)); this.services = services ?? throw new ArgumentNullException(nameof(services)); this.parentClient = this.kubernetes.GetClient <TParent>(); this.childClient = this.kubernetes.GetClient <TChild>(); }
/// <summary> /// Initializes a new instance of the <see cref="LicenseStore"/> class. /// </summary> /// <param name="kubernetesClient"> /// A <see cref="kubernetesClient"/> which provides access to the Kubernetes cluster. /// </param> /// <param name="logger"> /// A logger which can be used when logging. /// </param> public LicenseStore(KubernetesClient kubernetesClient, ILogger <LicenseStore> logger) { this.kubernetesClient = kubernetesClient ?? throw new ArgumentNullException(nameof(kubernetesClient)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.configClient = this.kubernetesClient.GetClient <V1ConfigMap>(); }
/// <summary> /// Initializes a new instance of the <see cref="KubernetesDeveloperProfile"/> class. /// </summary> /// <param name="kubernetes"> /// A <see cref="KubernetesClient"/> which represents the connection to the Kubernetes cluster. /// </param> /// <param name="logger"> /// A logger which can be used when logging. /// </param> public KubernetesDeveloperProfile(KubernetesClient kubernetes, ILogger <KubernetesDeveloperProfile> logger) { this.kubernetes = kubernetes ?? throw new ArgumentNullException(nameof(kubernetes)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.secretClient = kubernetes.GetClient <V1Secret>(); }