Skip to content

Commit

Permalink
wip: updatin config
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie authored Jan 20, 2025
1 parent 78e9d3b commit b5d3f0a
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,76 @@ type Config struct {
HTTPPort *int `json:"http_port,omitempty"`
// Gateway ...
Gateway *Gateway `json:"gateway,omitempty"`
// ClientAdvertise ...
ClientAdvertise *string `json:"client_advertise,omitempty"`
// TLS ...
TLS *TLS `json:"tls,omitempty"`
}

// JetStream ...
type JetStream struct {
// Enabled ...
Enabled bool `json:"enabled" default:"true"`
// StoreDir ...
StoreDir string `json:"store_dir" default:"/tmp/nats/jetstream"`
// MaxMemoryStore ...
MaxMemoryStore *int `json:"max_memory_store,omitempty"`
// MaxFileStore ...
MaxFileStore *int `json:"max_file_store,omitempty"`
// Domain ...
Domain *string `json:"domain,omitempty"`
// EncryptionKey ...
EncryptionKey *string `json:"encryption_key,omitempty"`
// Cipher ...
Cipher *string `json:"cipher,omitempty"`
// ExtensionHint ...
ExtensionHint *string `json:"extension_hint,omitempty"`
// Limits ...
Limits *JetStreamLimits `json:"limits,omitempty"`
// UniqueTag ...
UniqueTag *string `json:"unique_tag,omitempty"`
// MaxOutStandingCatchUp ...
MaxOutStandingCatchUp *string `json:"max_outstanding_catchup,omitempty" default:"32M"`
// SyncInterval ...
SyncInterval *string `json:"sync_interval,omitempty" default:"2m"`
}

// JetStreamLimits ...
type JetStreamLimits struct {
// MaxAckPending ...
MaxAckPending *int `json:"max_ack_pending,omitempty"`
// MaxHaAssets ...
MaxHaAssets *int `json:"max_ha_assets,omitempty"`
// MaxRequestBatch ...
MaxRequestBatch *int `json:"max_request_batch,omitempty"`
// DuplicateWindow ...
DuplicateWindow *int `json:"duplicate_window,omitempty"`
}

// TLS ...
type TLS struct {
// CertFile ...
CertFile string `json:"cert_file"`
// KeyFile ...
KeyFile string `json:"key_file"`
// CAFile ...
CAFile string `json:"ca_file"`
// CipherSuites ...
CipherSuites *string `json:"cipher_suites"`
// CurvePreferences ...
CurvePreferences *string `json:"curve_preferences,omitempty"`
// Insecure ...
Insecure *bool `json:"insecure,omitempty"`
// Verify ...
Verify bool `json:"verify"`
// VerifyAndMap ...
VerifyAndMap bool `json:"verify_and_map"`
// VerifyCertAndCheckKnownURLs ...
VerifyCertAndCheckKnownURLs *bool `json:"verify_cert_and_check_known_urls,omitempty"`
// ConnectionRateLimit ...
ConnectionRateLimit *int `json:"connection_rate_limit,omitempty"`
// PinnedCerts ...
PinnedCerts []string `json:"pinned_certs"`
}

// Marshal ...
Expand Down

0 comments on commit b5d3f0a

Please sign in to comment.