config

package
v0.0.0-...-320bece Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinConnectInterval = 5 * time.Second
	MaxConnectInterval = 300 * time.Second
)

Variables

This section is empty.

Functions

func Files

func Files(name string) []string

func InitSettings

func InitSettings(settings Settings)

Types

type Config

type Config struct {
	Server struct {
		URL string `ini:"url"`
		ID  string `ini:"id"`
		Key string `ini:"key"`
	} `ini:"server"`
	SSL struct {
		Verify bool   `ini:"verify"`
		CaCert string `ini:"ca_cert"`
	} `ini:"ssl"`
	Logging struct {
		Debug bool `ini:"debug"`
	} `ini:"logging"`
}

type Settings

type Settings struct {
	ServerURL   string
	WSPath      string
	UseSSL      bool
	CaCert      string // CA certificate file path
	SSLVerify   bool
	SSLOpt      map[string]interface{}
	HTTPThreads int
	ID          string
	Key         string
}
var (
	GlobalSettings Settings
)

func LoadConfig

func LoadConfig(configFiles []string) Settings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳