serv

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	TimeZone  string `yaml:"time_zone"`
	PprofOpen string `yaml:"pprof_open"`
}

type Config

type Config struct {
	Etcd   etcd.Config `yaml:"etcd"`
	Listen Listen      `yaml:"listen"`
	App    App         `yaml:"app"`
}

func (*Config) Load

func (c *Config) Load(path string) error

type EventInterface

type EventInterface interface {
	OnFlag(app.AppInterface) error
	OnBefore(app.AppInterface) error
	OnAfter(app.AppInterface) error
	OnRun() error
	OnShutdown()
}

type Listen

type Listen struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

func (*Listen) Addr

func (l *Listen) Addr() string

Jump to

Keyboard shortcuts

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