Skip to content

Commit

Permalink
update yaml config tags
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwe committed Jun 14, 2024
1 parent 114aac1 commit 07e83ad
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
14 changes: 14 additions & 0 deletions utils/configobserver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package utils

import (
Expand Down
14 changes: 14 additions & 0 deletions utils/configobserver_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package utils

import (
Expand Down
10 changes: 5 additions & 5 deletions xtls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ type Config struct {
Enabled bool `json:"enabled" yaml:"enabled"`

// Skip server certificate and domain verification.
Insecure bool `json:"insecure" yaml:"insecure"`
Insecure bool `json:"insecure" yaml:"insecure" config:"allowempty"`

// Server name indication for TLS.
ServerName string `json:"serverName" yaml:"server_name"`
ServerName string `json:"serverName" yaml:"server_name" config:"allowempty"`

// File containing trusted root certificates for verifying the server.
CACertFile string `json:"caCertFile" yaml:"ca_cert_file"`
CACertFile string `json:"caCertFile" yaml:"ca_cert_file" config:"allowempty"`

// File containing client certificate (public key), to present to the
// server. Must also provide @ClientKey option.
ClientCertFile string `json:"clientCertFile" yaml:"client_cert_file"`
ClientCertFile string `json:"clientCertFile" yaml:"client_cert_file" config:"allowempty"`

// File containing client private key, to present to the server.
// Must also provide @ClientCert option.
ClientKeyFile string `json:"clientKeyFile" yaml:"client_key_file"`
ClientKeyFile string `json:"clientKeyFile" yaml:"client_key_file" config:"allowempty"`
}

var ErrFailedToLoadCACert = errors.New("failed to load CACertificate")
Expand Down

0 comments on commit 07e83ad

Please sign in to comment.