g

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "1.0.1"
)

Variables

View Source
var (
	Logger *log.Logger
	Ipaddr string
)
View Source
var (
	ConfigFile string
)

Functions

func InitLog

func InitLog() *log.Logger

func ParseConfig

func ParseConfig(cfg string)

Types

type GlobalConfig

type GlobalConfig struct {
	Debug        bool        `json:"debug"`
	LogFile      string      `json:"logfile"`
	LogMaxAge    int         `json:"logmaxage"`
	LogRotateAge int         `json:"logrotateage"`
	Http         *HttpConfig `json:"http"`
}

func Config

func Config() *GlobalConfig

type HttpConfig

type HttpConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
	Port    string `json:"port"`
}

type HttpPingRequest

type HttpPingRequest struct {
	Ipaddr string `json:"ipaddr"`
}

type HttpPingResponse

type HttpPingResponse struct {
	PingStatus bool   `json:"pingcheck"`
	Ipaddr     string `json:"ipaddr"`
}

Jump to

Keyboard shortcuts

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