github.com/palantir/witchcraft-go-server/v2@v2.76.0/config/install.go (about)

     1  // Copyright (c) 2018 Palantir Technologies. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package config
    16  
    17  import (
    18  	"time"
    19  )
    20  
    21  // Install specifies the base install configuration fields that should be included in all witchcraft-go-server server
    22  // install configurations.
    23  type Install struct {
    24  	ProductName               string        `yaml:"product-name,omitempty"`
    25  	ProductVersion            string        `yaml:"product-version,omitempty"`
    26  	Server                    Server        `yaml:"server,omitempty"`
    27  	MetricsEmitFrequency      time.Duration `yaml:"metrics-emit-frequency,omitempty"`
    28  	TraceSampleRate           *float64      `yaml:"trace-sample-rate,omitempty"`
    29  	ManagementTraceSampleRate *float64      `yaml:"management-trace-sample-rate,omitempty"`
    30  	UseConsoleLog             bool          `yaml:"use-console-log,omitempty"`
    31  	UseWrappedLogs            bool          `yaml:"use-wrapped-logs,omitempty"`
    32  }
    33  
    34  type Server struct {
    35  	Address        string   `yaml:"address,omitempty"`
    36  	Port           int      `yaml:"port,omitempty" `
    37  	ManagementPort int      `yaml:"management-port,omitempty" `
    38  	ContextPath    string   `yaml:"context-path,omitempty"`
    39  	ClientCAFiles  []string `yaml:"client-ca-files,omitempty"`
    40  	CertFile       string   `yaml:"cert-file,omitempty"`
    41  	KeyFile        string   `yaml:"key-file,omitempty"`
    42  }