apps

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 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 added in v0.6.1

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 added in v0.6.1

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 added in v0.6.1

type Docker struct {

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

func GetDocker added in v0.6.1

func GetDocker(opts ...DockerOption) *Docker

func NewDocker added in v0.6.1

func NewDocker(opts ...DockerOption) *Docker

func (*Docker) GetParent added in v0.6.1

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

func (*Docker) Init added in v0.6.1

func (app *Docker) Init()

func (*Docker) Ready added in v0.6.1

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

func (*Docker) SetParent added in v0.6.1

func (app *Docker) SetParent(parent ServerApp)

func (*Docker) Start added in v0.6.1

func (app *Docker) Start()

func (*Docker) Stop added in v0.6.1

func (app *Docker) Stop()

func (*Docker) Wait added in v0.6.1

func (app *Docker) Wait()

type DockerApp added in v0.6.1

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

type DockerOption added in v0.6.1

type DockerOption func(dck DockerApp)

func WithDockerParent added in v0.6.1

func WithDockerParent(parent ServerApp) DockerOption

type NodeApp

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

type Server added in v0.6.1

type Server struct {

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

func (*Server) GetApi added in v0.6.1

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

func (*Server) GetNodeService added in v0.6.1

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

func (*Server) Init added in v0.6.1

func (app *Server) Init()

func (*Server) SetGrpcAddress added in v0.6.1

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

func (*Server) Start added in v0.6.1

func (app *Server) Start()

func (*Server) Stop added in v0.6.1

func (app *Server) Stop()

func (*Server) Wait added in v0.6.1

func (app *Server) Wait()

type ServerApp added in v0.6.1

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

func GetServer added in v0.6.1

func GetServer(opts ...ServerOption) ServerApp

func NewServer added in v0.6.1

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

type ServerOption added in v0.6.1

type ServerOption func(app ServerApp)

func WithServerConfigPath added in v0.6.1

func WithServerConfigPath(path string) ServerOption

func WithServerGrpcAddress added in v0.6.1

func WithServerGrpcAddress(address interfaces.Address) ServerOption

Jump to

Keyboard shortcuts

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