Skip to content

Migrate ssh tunneling and source config out of core config #44558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
/* Copyright (c) 2024 Airbyte, Inc., all rights reserved. */
package io.airbyte.cdk.command

import io.airbyte.cdk.ssh.SshConnectionOptions
import io.airbyte.cdk.ssh.SshTunnelMethodConfiguration
import java.time.Duration

/**
* Interface that defines a typed connector configuration.
*
* Prefer this or its implementations over the corresponding configuration POJOs; i.e.
* [ConfigurationJsonObjectBase] subclasses.
*/
interface Configuration {
val realHost: String
val realPort: Int
val sshTunnel: SshTunnelMethodConfiguration
val sshConnectionOptions: SshConnectionOptions

val maxConcurrency: Int
val resourceAcquisitionHeartbeat: Duration
}
interface Configuration
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2024 Airbyte, Inc., all rights reserved.
*/

package io.airbyte.cdk.command

import io.airbyte.cdk.ssh.SshConnectionOptions
import io.airbyte.cdk.ssh.SshTunnelMethodConfiguration

interface SshTunnelConfiguration {
val realHost: String
val realPort: Int
val sshTunnel: SshTunnelMethodConfiguration
val sshConnectionOptions: SshConnectionOptions
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import jakarta.inject.Singleton
import java.time.Duration

/** Subtype of [Configuration] for sources. */
interface SourceConfiguration : Configuration {
interface SourceConfiguration : Configuration, SshTunnelConfiguration {
/** Does READ generate states of type GLOBAL? */
val global: Boolean

/** During the READ operation, how often a feed should checkpoint, ideally. */
val checkpointTargetInterval: Duration

/** Reader concurrency configuration. */
val maxConcurrency: Int
val resourceAcquisitionHeartbeat: Duration

/**
* Micronaut factory which glues [ConfigurationJsonObjectSupplier] and
* [SourceConfigurationFactory] together to produce a [SourceConfiguration] singleton.
Expand Down
Loading