app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cli

func Cli(name string, appVersion string, buildTime string, application gira.Application) error

需要两个系参数 xx -id 1 start|stop|restart

func StartAsClient

func StartAsClient(application gira.Application, appId int32, appType string) error

func StartAsServer

func StartAsServer(application gira.Application, appId int32, appType string) error

Types

type ClientApplication

type ClientApplication struct {
}

func (*ClientApplication) OnConfigLoad

func (s *ClientApplication) OnConfigLoad(c *gira.Config) error

func (*ClientApplication) OnCreate

func (s *ClientApplication) OnCreate() error

func (*ClientApplication) OnStart

func (s *ClientApplication) OnStart() error

func (*ClientApplication) OnStop

func (s *ClientApplication) OnStop() error

type Runtime

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

/ @Component

func (*Runtime) Application

func (runtime *Runtime) Application() gira.Application

================== application =========================

func (*Runtime) BroadcastReloadResource

func (runtime *Runtime) BroadcastReloadResource(ctx context.Context, name string) (result gira.BroadcastReloadResourceResult, err error)

================== implement gira.AdminClient ================== 重载配置

func (*Runtime) Context

func (runtime *Runtime) Context() context.Context

func (*Runtime) Done

func (runtime *Runtime) Done() <-chan struct{}

func (*Runtime) Err

func (runtime *Runtime) Err() error

func (*Runtime) Frameworks

func (runtime *Runtime) Frameworks() []gira.Framework

================== framework ========================= 返回框架列表

func (*Runtime) GetAccountCacheClient

func (runtime *Runtime) GetAccountCacheClient() gira.DbClient

func (*Runtime) GetAccountDbClient

func (runtime *Runtime) GetAccountDbClient() gira.DbClient

================== implement gira.DbClientComponent ==================

func (*Runtime) GetAdminCacheClient

func (runtime *Runtime) GetAdminCacheClient() gira.DbClient

func (*Runtime) GetAdminDbClient

func (runtime *Runtime) GetAdminDbClient() gira.DbClient

func (*Runtime) GetAppFullName

func (runtime *Runtime) GetAppFullName() string

返回应用全名

func (*Runtime) GetAppId

func (runtime *Runtime) GetAppId() int32

返回应用id

func (*Runtime) GetAppName

func (runtime *Runtime) GetAppName() string

返回应用名

func (*Runtime) GetAppType

func (runtime *Runtime) GetAppType() string

返回应用类型

func (*Runtime) GetAppVersion

func (runtime *Runtime) GetAppVersion() string

返回构建版本

func (*Runtime) GetBehaviorDbClient

func (runtime *Runtime) GetBehaviorDbClient() gira.DbClient

func (*Runtime) GetBuildTime

func (runtime *Runtime) GetBuildTime() int64

返回构建时间

func (*Runtime) GetConfig

func (runtime *Runtime) GetConfig() *gira.Config

================== implement gira.Application ================== 返回配置

func (*Runtime) GetCron

func (runtime *Runtime) GetCron() gira.Cron

================== gira.Cron ==================

func (*Runtime) GetEnv

func (runtime *Runtime) GetEnv() string

func (*Runtime) GetGameCacheClient

func (runtime *Runtime) GetGameCacheClient() gira.DbClient

func (*Runtime) GetGameDbClient

func (runtime *Runtime) GetGameDbClient() gira.DbClient

func (*Runtime) GetGrpcServer

func (runtime *Runtime) GetGrpcServer() gira.GrpcServer

================== gira.GrpcServerComponent ==================

func (*Runtime) GetLogDbClient

func (runtime *Runtime) GetLogDbClient() gira.DbClient

func (*Runtime) GetLogDir

func (runtime *Runtime) GetLogDir() string

func (*Runtime) GetPlatformSdk

func (runtime *Runtime) GetPlatformSdk() gira.PlatformSdk

================== gira.SdkComponent ==================

func (*Runtime) GetRegistry

func (runtime *Runtime) GetRegistry() gira.Registry

================== gira.RegistryComponent ==================

func (*Runtime) GetRegistryClient

func (runtime *Runtime) GetRegistryClient() gira.RegistryClient

func (*Runtime) GetResourceDbClient

func (runtime *Runtime) GetResourceDbClient() gira.DbClient

func (*Runtime) GetResourceLoader

func (runtime *Runtime) GetResourceLoader() gira.ResourceLoader

================== implement gira.ResourceComponent ==================

func (*Runtime) GetServiceContainer

func (runtime *Runtime) GetServiceContainer() gira.ServiceContainer

================== gira.ServiceContainer ==================

func (*Runtime) GetStatDbClient

func (runtime *Runtime) GetStatDbClient() gira.DbClient

func (*Runtime) GetUpTime

func (runtime *Runtime) GetUpTime() int64

func (*Runtime) GetWorkDir

func (runtime *Runtime) GetWorkDir() string

func (*Runtime) GetZone

func (runtime *Runtime) GetZone() string

func (*Runtime) Go

func (runtime *Runtime) Go(f func() error)

func (*Runtime) Quit

func (runtime *Runtime) Quit()

func (*Runtime) Stop

func (runtime *Runtime) Stop() error

主动关闭, 启动成功后才可以调用

func (*Runtime) Wait

func (runtime *Runtime) Wait() error

等待中断

Jump to

Keyboard shortcuts

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