server

package
v0.0.6 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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(e EventInterface, name string)

Types

type App

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

type Config

type Config struct {
	Listen krpc.Local  `yaml:"listen"` // lsiten config
	Etcd   etcd.Config `yaml:"etcd"`   // etcd config
	Zap    zap.Config  `yaml:"zap"`    // zap config
	App    App         `yaml:"app"`    // app config
}

func (*Config) Load

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

type EventInterface

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

Jump to

Keyboard shortcuts

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