apps

package
v0.0.0-...-33f46c2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultWait

func DefaultWait()

func Start

func Start(app App)

Types

type Api

type Api struct {
	// dependencies
	interfaces.WithConfigPath
	// contains filtered or unexported fields
}

func GetApi

func GetApi() *Api

func NewApi

func NewApi() *Api

func (*Api) GetGinEngine

func (app *Api) GetGinEngine() *gin.Engine

func (*Api) GetHttpServer

func (app *Api) GetHttpServer() *http.Server

func (*Api) Init

func (app *Api) Init()

func (*Api) Ready

func (app *Api) Ready() (ok bool)

func (*Api) Start

func (app *Api) Start()

func (*Api) Stop

func (app *Api) Stop()

func (*Api) Wait

func (app *Api) Wait()

type ApiApp

type ApiApp interface {
	App
	GetGinEngine() (engine *gin.Engine)
	GetHttpServer() (svr *http.Server)
	Ready() (ok bool)
}

type App

type App interface {
	Init()
	Start()
	Wait()
	Stop()
}

type Docker

type Docker struct {

	// dependencies
	interfaces.WithConfigPath
	// contains filtered or unexported fields
}

func GetDocker

func GetDocker(opts ...DockerOption) *Docker

func NewDocker

func NewDocker(opts ...DockerOption) *Docker

func (*Docker) GetParent

func (app *Docker) GetParent() (parent ServerApp)

func (*Docker) Init

func (app *Docker) Init()

func (*Docker) Ready

func (app *Docker) Ready() (ok bool)

func (*Docker) SetParent

func (app *Docker) SetParent(parent ServerApp)

func (*Docker) Start

func (app *Docker) Start()

func (*Docker) Stop

func (app *Docker) Stop()

func (*Docker) Wait

func (app *Docker) Wait()

type DockerApp

type DockerApp interface {
	App
	GetParent() (parent ServerApp)
	SetParent(parent ServerApp)
	Ready() (ok bool)
}

type DockerOption

type DockerOption func(dck DockerApp)

func WithDockerParent

func WithDockerParent(parent ServerApp) DockerOption

type NodeApp

type NodeApp interface {
	App
	interfaces.WithConfigPath
	SetGrpcAddress(address interfaces.Address)
}

type Server

type Server struct {

	// dependencies
	interfaces.WithConfigPath
	// contains filtered or unexported fields
}

func (*Server) GetApi

func (app *Server) GetApi() (api *Api)

func (*Server) GetNodeService

func (app *Server) GetNodeService() (svc interfaces.NodeService)

func (*Server) Init

func (app *Server) Init()

func (*Server) SetGrpcAddress

func (app *Server) SetGrpcAddress(address interfaces.Address)

func (*Server) Start

func (app *Server) Start()

func (*Server) Stop

func (app *Server) Stop()

func (*Server) Wait

func (app *Server) Wait()

type ServerApp

type ServerApp interface {
	NodeApp
	GetApi() (api *Api)
	GetNodeService() (masterSvc interfaces.NodeService)
}

func GetServer

func GetServer(opts ...ServerOption) ServerApp

func NewServer

func NewServer(opts ...ServerOption) (app ServerApp)

type ServerOption

type ServerOption func(app ServerApp)

func WithServerConfigPath

func WithServerConfigPath(path string) ServerOption

func WithServerGrpcAddress

func WithServerGrpcAddress(address interfaces.Address) ServerOption

Jump to

Keyboard shortcuts

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