runtime

package
v0.0.0-...-82c6a1a Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HttpServer HttpServerConfig
	WsServer   WsServerConfig
}

Config - config for runtime.

type HttpServerConfig

type HttpServerConfig struct {
	Port               string
	RegisterRoutesCall func(*router.HttpRouter)
}

HttpServerConfig - config for http server.

type Runtime

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

Runtime - object that aggregate dependents.

func NewRuntime

func NewRuntime(config *Config) *Runtime

NewRuntime - instantiate new runtime.

func (*Runtime) Init

func (r *Runtime) Init()

Init - init runtime dependencies. Run it at first initialization.

func (*Runtime) ServeCmd

func (r *Runtime) ServeCmd()

ServeCmd - handles cmd shell commands to manage runtime dependencies.

func (*Runtime) ServeHttpServer

func (r *Runtime) ServeHttpServer()

ServeHttpServer - serve HTTP server.

func (*Runtime) ServeWsServer

func (r *Runtime) ServeWsServer()

ServeWsServer - serve Socket server.

func (*Runtime) StartCmd

func (r *Runtime) StartCmd()

StartCmd - initialize process of starting cmd .

func (*Runtime) StartServers

func (r *Runtime) StartServers()

StartServers - initialize process of starting all servers.

func (*Runtime) WaitCmdExit

func (r *Runtime) WaitCmdExit()

WaitCmdExit - should be put on the end of serve cmd process.

func (*Runtime) WaitServersStarted

func (r *Runtime) WaitServersStarted()

WaitServersStarted - Wait to run all serving servers. Should be put in the end of start servers process.

type WsServerConfig

type WsServerConfig struct {
	Port               string
	RegisterRoutesCall func(*router.WsRouter)
}

WsServerConfig - config for websocket server.

Jump to

Keyboard shortcuts

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