server

package
v0.0.0-...-f79bcc6 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 21 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 {
	RestServer        *rest.Server        // http server
	GrpcServer        *rpc.Server         // grpc server
	ConsumerScheduler *consumer.Scheduler // kafka consumer
	IServers          []IServer           // servers
	Signal            chan os.Signal      // 监听信号
	// contains filtered or unexported fields
}

func InitApp

func InitApp() (*App, func(), error)

func NewApp

func NewApp(h *rest.Server, g *rpc.Server, scheduler *consumer.Scheduler, logger *zap.SugaredLogger, tracer opentracing.Tracer) (app *App, closeFunc func(), err error)

func (*App) Run

func (a *App) Run(ctx context.Context) error

type IServer

type IServer interface {
	Name() string
	Run(ctx context.Context) error
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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