Skip to content

Commit

Permalink
Use upstream TLSClientSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Apr 11, 2024
1 parent f9de917 commit 65aff15
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,9 @@ func (ct *TracingModule) newTemplatedGenerator(g goja.ConstructorCall, rt *goja.
}

type ClientConfig struct {
Exporter exporterType `json:"type"`
Endpoint string `json:"url"`
Insecure bool `json:"insecure"`
TLSServerName string `json:"tls_server_name"`
TLSCertFile string `json:"tls_cert_file"`
TLSKeyFile string `json:"tls_key_file"`
TLSCAFile string `json:"tls_ca_file"`
Exporter exporterType `json:"type"`
Endpoint string `json:"url"`
TLS configtls.TLSClientSetting `json:"tls"`
Authentication struct {
User string `json:"user"`
Password string `json:"password"`
Expand All @@ -174,12 +170,12 @@ func NewClient(cfg *ClientConfig, vu modules.VU) (*Client, error) {
)

tlsConfig := configtls.TLSClientSetting{
Insecure: cfg.Insecure,
ServerName: cfg.TLSServerName,
Insecure: cfg.TLS.Insecure,
ServerName: cfg.TLS.ServerName,
TLSSetting: configtls.TLSSetting{
CAFile: cfg.TLSCAFile,
CertFile: cfg.TLSCertFile,
KeyFile: cfg.TLSKeyFile,
CAFile: cfg.TLS.CAFile,
CertFile: cfg.TLS.CertFile,
KeyFile: cfg.TLS.KeyFile,
},
}

Expand Down

0 comments on commit 65aff15

Please sign in to comment.