app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *App

New create a new app instance

func (*App) Run

func (a *App) Run() error

Run start the app instance

func (*App) Stop

func (a *App) Stop() error

Stop the app instance

type Option

type Option func(o *options)

func WithEndpoints

func WithEndpoints(endpoints []*url.URL) Option

func WithName

func WithName(name string) Option

func WithRPCServer

func WithRPCServer(server *rpcserver.Server) Option

WithRPCServer allows user to provide own implementation of rpc server

func WithRegistrar

func WithRegistrar(registrar registry.Registrar) Option

WithRegistrar allows user to provide own implementation of registry center

func WithRegistrarTimeout

func WithRegistrarTimeout(registrarTimeout time.Duration) Option

func WithRestServer

func WithRestServer(server *restserver.Server) Option

WithRestServer allows user to provide own implementation of rest server

func WithSigs

func WithSigs(sigs []os.Signal) Option

func WithStopTimeout

func WithStopTimeout(stopTimeout time.Duration) Option

Jump to

Keyboard shortcuts

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