web

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAddress is the default address the application will bind to
	DefaultAddress = "0.0.0.0"

	// DefaultPort is the default port the application will listen on
	DefaultPort = 8080
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address to listen on (defaults to 0.0.0.0 specified by DefaultAddress)
	Address string `yaml:"address"`

	// Port to listen on (default to 8080 specified by DefaultPort)
	Port int `yaml:"port"`
}

Config is the structure which supports the configuration of the endpoint which provides access to the web frontend

func GetDefaultConfig

func GetDefaultConfig() *Config

GetDefaultConfig returns a Config struct with the default values

func (*Config) SocketAddress

func (web *Config) SocketAddress() string

SocketAddress returns the combination of the Address and the Port

func (*Config) ValidateAndSetDefaults

func (web *Config) ValidateAndSetDefaults() error

ValidateAndSetDefaults validates the web configuration and sets the default values if necessary.

Jump to

Keyboard shortcuts

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