mirror of
https://github.com/fosrl/newt.git
synced 2026-03-27 13:06:38 +00:00
Add --config-file
This commit is contained in:
@@ -42,6 +42,7 @@ type Client struct {
|
||||
onTokenUpdate func(token string)
|
||||
writeMux sync.Mutex
|
||||
clientType string // Type of client (e.g., "newt", "olm")
|
||||
configFilePath string // Optional override for the config file path
|
||||
tlsConfig TLSConfig
|
||||
metricsCtxMu sync.RWMutex
|
||||
metricsCtx context.Context
|
||||
@@ -77,6 +78,12 @@ func WithBaseURL(url string) ClientOption {
|
||||
}
|
||||
|
||||
// WithTLSConfig sets the TLS configuration for the client
|
||||
func WithConfigFile(path string) ClientOption {
|
||||
return func(c *Client) {
|
||||
c.configFilePath = path
|
||||
}
|
||||
}
|
||||
|
||||
func WithTLSConfig(config TLSConfig) ClientOption {
|
||||
return func(c *Client) {
|
||||
c.tlsConfig = config
|
||||
|
||||
Reference in New Issue
Block a user