-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* ARMADA-2848 Move PulsarConfig into commonconfig * Update test name TestValidateHasJobSetID->Id * Revert unintended changes to yarn.lock file * fix import order Co-authored-by: Eleanor Pratt <[email protected]>
- Loading branch information
1 parent
286cfd5
commit 35cb59f
Showing
11 changed files
with
66 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package config | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/apache/pulsar-client-go/pulsar" | ||
) | ||
|
||
type PulsarConfig struct { | ||
// Pulsar URL | ||
URL string `validate:"required"` | ||
// Path to the trusted TLS certificate file (must exist) | ||
TLSTrustCertsFilePath string | ||
// Whether Pulsar client accept untrusted TLS certificate from broker | ||
TLSAllowInsecureConnection bool | ||
// Whether the Pulsar client will validate the hostname in the broker's TLS Cert matches the actual hostname. | ||
TLSValidateHostname bool | ||
// Max number of connections to a single broker that will be kept in the pool. (Default: 1 connection) | ||
MaxConnectionsPerBroker int | ||
// Whether Pulsar authentication is enabled | ||
AuthenticationEnabled bool | ||
// Authentication type. For now only "JWT" auth is valid | ||
AuthenticationType string | ||
// Path to the JWT token (must exist). This must be set if AuthenticationType is "JWT" | ||
JwtTokenPath string | ||
// The pulsar topic that Jobset Events will be published to | ||
JobsetEventsTopic string | ||
// Compression to use. Valid values are "None", "LZ4", "Zlib", "Zstd". Default is "None" | ||
CompressionType pulsar.CompressionType | ||
// Compression Level to use. Valid values are "Default", "Better", "Faster". Default is "Default" | ||
CompressionLevel pulsar.CompressionLevel | ||
// Maximum allowed Events per message | ||
MaxAllowedEventsPerMessage int `validate:"gte=0"` | ||
// Maximum allowed message size in bytes | ||
MaxAllowedMessageSize uint | ||
// Timeout when sending messages asynchronously | ||
SendTimeout time.Duration `validate:"required"` | ||
// Backoff from polling when Pulsar returns an error | ||
BackoffTime time.Duration | ||
// Number of pulsar messages that will be queued by the pulsar consumer. | ||
ReceiverQueueSize int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters