runtime

package
v0.0.0-...-fc7dab2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRuntime

func NewRuntime(nodeMngr pkg.NodeManager, parser pkg.CliParser) *runtime

Types

type GlobalRegistryInterface

type GlobalRegistryInterface interface {
	Runtime() rt.Runtime
	SetRuntime(rt.Runtime)
	App() pkg.App
	SetApp(pkg.App)
	RegisterHook(Hook, HookHandler)
	InvokeHooks(Hook, ...interface{}) error
	ServiceLocator(string) ServiceLocator
}

func GlobalRegistry

func GlobalRegistry() GlobalRegistryInterface

type Hook

type Hook int
const (
	ServiceInitHook Hook = iota + 1
	CmdCreateDbHook
	CmdMigrateDbHook
)

type HookHandler

type HookHandler func(...interface{}) error

type NodePool

type NodePool interface {
	Add(pkg.Node)
	Remove(i.NodeId)
	FindById(i.NodeId) pkg.Node
	FilterByStatus(NodeStatus) NodePool
	Len() int
}

type NodeStatus

type NodeStatus int
const (
	Available NodeStatus = iota + 1
)

type ServiceEndpoint

type ServiceEndpoint interface {
	Address() net.Addr
	EncKey() []byte
}

type ServiceLocator

type ServiceLocator interface {
	FindByMethodName(string) NodePool
	ServiceNameByMethod(string) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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