Documentation
¶
Overview ¶
Example of a daemon with echo service
Index ¶
- Constants
- Variables
- func Newparrot(appName string, platName string, systemName string, serverTypes []string, ...) *parrot
- type Cli
- type ICli
- type MicroApp
- type Option
- func WithClusterName(clusterName string) Option
- func WithDebug() Option
- func WithName(name string) Option
- func WithPbRegister(f func(component.IContainer, *grpc.Server)) Option
- func WithPlatName(platName string) Option
- func WithProduct() Option
- func WithRegistry(addr string) Option
- func WithRemoteLogger() Option
- func WithRemoteQueryService(remoteQueryService bool) Option
- func WithServerTypes(serverType ...string) Option
- func WithSystemName(systemName string) Option
Constants ¶
View Source
const ( ModeInstall = "install" ModeRun = "run" ModeConf = "conf" ModeRegistry = "registry" ModeService = "service" )
Variables ¶
View Source
var ( VERSION = "2.0.0" BuildTime = "" )
VERSION 版本号
Functions ¶
func Newparrot ¶
func Newparrot(appName string, platName string, systemName string, serverTypes []string, clusterName string, trace string, registryAddr string, isDebug bool, remoteLogger bool, logger *logger.Logger, r component.IComponentHandler, PbFunc func(component.IContainer, *grpc.Server)) *parrot
Newparrot 创建parrot服务器
Types ¶
type ICli ¶
type ICli interface { //Append 添加命令行参数 Append(mode string, flag cli.Flag) //Validate 添加验证函数 Validate(mode string, f func(*cli.Context) error) //Context 获取命令行上下文 Context() *cli.Context // contains filtered or unexported methods }
ICli 命令行参数
type MicroApp ¶
type MicroApp struct { //Conf 绑定安装程序 Conf *creator.Binder // registry registry.IRegistry component.IComponentRegistry Cli ICli // contains filtered or unexported fields }
MicroApp 微服务应用
type Option ¶
type Option func(*option)
Option 配置选项
func WithPbRegister ¶
func WithPbRegister(f func(component.IContainer, *grpc.Server)) Option
func WithRemoteQueryService ¶
WithRemoteQueryService 启动远程查询服务
Source Files
¶
Click to show internal directories.
Click to hide internal directories.