runner

package
v0.0.0-...-71fdcac Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SizeNotSpecified DeploySize = 0
	SizeExtraSmall              = 1
	SizeSmall                   = 2
	SizeMedium                  = 3
	SizeLarge                   = 4
	SizeExtraLarge              = 5
	SizeLast                    = SizeExtraLarge
)
View Source
const (
	ArrangeNotSpecified       DeployArrangement = 0
	LocalProcess                                = 1
	LocalDocker                                 = 2
	ArragementRemoteMarkerBit                   = 0x10000
	RemoteProcess                               = ArragementRemoteMarkerBit | 1
	RemoteDocker                                = ArragementRemoteMarkerBit | 2
	ArrangementLocalLast                        = LocalDocker
	ArrangementRemoteLast                       = RemoteDocker
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployArrangement

type DeployArrangement int

type DeployConfig

type DeployConfig struct {
	Microservice     map[string]*Microservice
	Flag             *DeployFlag
	ParigotLibPath   string
	SearchDir        []string
	ParigotLibSymbol string
	Arrangement      DeployArrangement
	ArrangementName  string
	Size             DeploySize
	SizeName         string
	Timezone         string
	TimezoneDir      string
	Timeout          Timeout
}

DeployConfig represents the microservices that the user has configured for this application. Public fields in this struct are data that has been read from the user and has been sanity checked.

func Parse

func Parse(path string, flag *DeployFlag) (*DeployConfig, error)

func (*DeployConfig) AllName

func (c *DeployConfig) AllName() []string

func (*DeployConfig) LoadAllModules

func (c *DeployConfig) LoadAllModules(engine eng.Engine) error

func (*DeployConfig) LoadSingleModule

func (c *DeployConfig) LoadSingleModule(engine eng.Engine, name string) (eng.Module, error)

func (*DeployConfig) Module

func (c *DeployConfig) Module(name string) eng.Module

type DeployFlag

type DeployFlag struct {
	// TestMode being true means that microservices that are marked as "Test" will be considered the program(s)
	// to run.  If TestMode is false, programs marked as Main will be run.  Note that microservices configured
	// to be Test are ignored when TestMode is false, and vice versa with microservices marked as Main.
	TestMode bool
}

DeployFlag is a structure that comes from the command line passed to the runner itself. These switches have a large effect on how the runner behaves.

type DeploySize

type DeploySize int

type Deployment

type Deployment struct {
	Config map[string]*DeployConfig
}

Deployment is a mapping from names to DeployConfigs.

type Microservice

type Microservice struct {
	WasmPath     string
	PluginSymbol string
	PluginPath   string
	PluginAlias  string

	Arg []string
	Env []string

	Server bool
	Main   bool
	Test   bool
	// contains filtered or unexported fields
}

Microservice is the unit of configuration for the DeployConfig. Public fields are data read from the user's configuration and these are checked for sanity before being returned.

func (*Microservice) GetArg

func (m *Microservice) GetArg() []string

func (*Microservice) GetEnv

func (m *Microservice) GetEnv() []string

func (*Microservice) GetModule

func (m *Microservice) GetModule() eng.Module

func (*Microservice) GetName

func (m *Microservice) GetName() string

func (*Microservice) GetPlugin

func (m *Microservice) GetPlugin() *plugin.Plugin

func (*Microservice) GetPluginAlias

func (m *Microservice) GetPluginAlias() string

func (*Microservice) GetPluginPath

func (m *Microservice) GetPluginPath() string

func (*Microservice) GetPluginSymbol

func (m *Microservice) GetPluginSymbol() string

func (*Microservice) GetWasmPath

func (m *Microservice) GetWasmPath() string

func (*Microservice) IsLocal

func (m *Microservice) IsLocal() bool

func (*Microservice) IsRemote

func (m *Microservice) IsRemote() bool

func (*Microservice) IsServer

func (m *Microservice) IsServer() bool

func (*Microservice) Module

func (m *Microservice) Module() eng.Module

func (*Microservice) Name

func (m *Microservice) Name() string

type Timeout

type Timeout struct {
	// Startup is the amount of time to wait for services to launch and
	// have all previously launched services start.  In other words, how
	// long to wait to see if we can get everything in the deployment configuration
	// running.
	Startup int
	// Complete is the length of time before a partially completed call will
	// be considered failed. If you call method foo() on service bar, this is
	// how long we will wait for bar to fulfull the call of foo() and provide
	// the return value.
	Complete int
}

Timeout settings are to control timeouts within the system. All values in milliseconds.

Jump to

Keyboard shortcuts

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