cmd

package
v0.0.0-...-cc42ea7 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServer

func RunServer() error

RunServer运行gRPC服务器和HTTP网关

Types

type Config

type Config struct {
	// gRPC服务器启动参数部分
	// GRPCPort是gRPC服务器监听的TCP端口
	GRPCPort string

	// HTTP/REST网关启动参数部分
	// HTTPPort是通过HTTP/REST网关监听的TCP端口
	HTTPPort string

	// 数据库数据存储参数部分
	// DatestoreDBHost是数据库的地址
	DatastoreDBHost string
	// DatastoreDBUser是用于连接数据库的用户名
	DatastoreDBUser string
	// DatastoreDBPassword是用于连接数据库的密码
	DatastoreDBPassword string
	// DatastoreDBSchema是数据库的名称
	DatastoreDBSchema string

	// 日志参数部分
	// LogLevel 是全局日志级别:Debug(-1),Info(0),Warn(1),Error(2),DPanic(3),Panic(4),Fatal(5)
	LogLevel int
	// LogTimeFormat 是记录器的打印时间格式,例如2006-01-02T15:04:05Z07:00
	LogTimeFormat string
}

Config是Server的配置

Jump to

Keyboard shortcuts

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