config

package
v0.0.0-...-87247c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config deals with the reading and storing of the config data in the memory for the execution of odimra-cli. The config model struct is also defined in the config package.

Package config ...

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultHTTPClient is the global reusable client instance for contacting a server
	DefaultHTTPClient = &http.Client{
		Timeout: 10 * time.Second,
	}
	// DefaultHTTPTransport is the global resuable tranport instance for contacting a server
	DefaultHTTPTransport = &http.Transport{
		MaxIdleConns:          100,
		IdleConnTimeout:       90 * time.Second,
		TLSHandshakeTimeout:   10 * time.Second,
		DisableKeepAlives:     true,
		MaxIdleConnsPerHost:   -1,
		ExpectContinueTimeout: 1 * time.Second,
	}
)
View Source
var Data configModel

Data will have the configuration data from config file

Functions

func GetHTTPClientObj

func GetHTTPClientObj(tlsConfig *tls.Config) *http.Client

GetHTTPClientObj is for obtaining a client instance for making http(s) queries

func SetConfiguration

func SetConfiguration() error

SetConfiguration will extract the config data from file

Types

type KeyCertConf

type KeyCertConf struct {
	RSAPublicKeyPath  string `json:"RSAPublicKeyPath"`
	RSAPrivateKeyPath string `json:"RSAPrivateKeyPath"`
}

KeyCertConf is for holding all security oriented configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL