app

package
v0.0.0-...-4c4187b Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confd

func Confd() *confd.Confd

func Flush

func Flush()

func Run

func Run() error

func Serve

func Serve(s ...Server) error

func Stop

func Stop(ctx context.Context)

Types

type Application

type Application struct {
	DeregisterTimeout time.Duration
	// contains filtered or unexported fields
}
var App *Application

func New

func New() *Application

func NewApp

func NewApp(options ...func(*Application)) *Application

func NewApplication

func NewApplication() *Application

func (*Application) Confd

func (app *Application) Confd() *confd.Confd

Confd 配置中心

func (*Application) Flush

func (app *Application) Flush()

func (*Application) LoadConfig

func (app *Application) LoadConfig() error

func (*Application) RegisterService

func (app *Application) RegisterService()

func (*Application) Run

func (app *Application) Run() error

func (*Application) Serve

func (app *Application) Serve(s ...Server) error

func (*Application) UnregisterService

func (app *Application) UnregisterService()

type ApplicationOption

type ApplicationOption func(*Application)

func Register

func Register(c string) ApplicationOption

type Server

type Server interface {
	Run() error
	Stop(context.Context)
}

Jump to

Keyboard shortcuts

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