engine

package
v0.0.0-...-6dc5add Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppName string
	RPC     RPCConf
	HTTP    HTTPConf
}

Config ...

type Engine

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

Engine engine define

func New

func New(conf *Config) *Engine

New create engine

func (*Engine) Start

func (engine *Engine) Start(ctx *context.Context, grpcRegister grpcRegisterFunc, httpRegister httpRegisterFunc)

Start start engine

type HTTPConf

type HTTPConf struct {
	Listen  string
	Actived bool
	PProf   bool
}

HTTPConf config define

type HTTPServer

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

HTTPServer ...

func NewHTTPServer

func NewHTTPServer(conf HTTPConf) *HTTPServer

NewHTTPServer new HTTPServer

func (*HTTPServer) Start

func (s *HTTPServer) Start(ctx *context.Context, register httpRegisterFunc) error

Start start grpc service

type RPCConf

type RPCConf struct {
	Listen  string
	Actived bool
}

RPCConf config define

type RPCServer

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

RPCServer ...

func NewRPCServer

func NewRPCServer(conf RPCConf) *RPCServer

NewRPCServer new RPCServer

func (*RPCServer) Start

func (s *RPCServer) Start(ctx *context.Context, register grpcRegisterFunc) error

Start start grpc service

Jump to

Keyboard shortcuts

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