lighthouse

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(cfg *Config)

Config is the configuration of lighthouse

Types

type Config

type Config struct {
	Title   string `config:"title"`
	Version string `config:"version"`
	Author  string `config:"author"`
	Server  struct {
		Host string `config:"host"`
		Port int64  `config:"port"`
	} `config:"server"`
	Upstreams []string `config:"upstreams"`
	Cache     struct {
		Engine string `config:"engine"`
		MaxAge int64  `config:"max_age"`
		Config struct {
			Host     string `config:"host"`
			Port     int64  `config:"port"`
			Db       int64  `config:"db"`
			Password string `config:"password"`
			Prefix   string `config:"prefix"`
		} `config:"config"`
	} `config:"cache"`
	Log struct {
		Transport string `config:"transport"`
		Level     string `config:"level"`
	} `config:"log"`
	Hosts struct {
		Enable bool   `config:"enable"`
		File   string `config:"file"`
	} `config:"hosts"`
}

Config is the configuration of lighthouse

Jump to

Keyboard shortcuts

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