feat: Add README.md

This commit is contained in:
sujit
2024-10-01 11:32:39 +05:45
parent 33d5d22770
commit e2bbb05a3e
15 changed files with 671 additions and 7 deletions

View File

@@ -16,6 +16,10 @@ type Options struct {
initialDelay time.Duration
maxBackoff time.Duration
jitterPercent float64
useTLS bool // Add a flag to enable/disable TLS
tlsCertPath string // Path to TLS certificate
tlsKeyPath string // Path to TLS private key
tlsCAPath string // Path to the Certificate Authority (optional)
}
func defaultOptions() Options {
@@ -39,6 +43,16 @@ func WithBrokerURL(url string) Option {
}
}
// Option to enable/disable TLS
func WithTLS(enableTLS bool, certPath, keyPath, caPath string) Option {
return func(o *Options) {
o.useTLS = enableTLS
o.tlsCertPath = certPath
o.tlsKeyPath = keyPath
o.tlsCAPath = caPath
}
}
// WithSyncMode -
func WithSyncMode(mode bool) Option {
return func(opts *Options) {