nodeimpl

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_DIR_FPERMS                               = fs.FileMode(0o770)
	DEFAULT_MAX_APP_USABLE_SPACE                 = 1_000_000_000
	DEFAULT_MAX_APP_FILE_COUNT                   = 1_000_000
	DEFAULT_MAX_APP_PARALLEL_FILE_CREATION_COUNT = 100

	MAX_DONE_CALLBACK_WAIT_TIME = 100 * time.Millisecond

	APP_LOG_SRC_PREFIX = "apps/"
)
View Source
const (
	APP_STOP_TIMEOUT       = 5 * time.Second //max time before the application is ungracefully stopped.
	APP_DEPLOYMENT_TIMEOUT = 10 * time.Second
)
View Source
const (
	AGENT_LOG_SRC = "node-agent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

A node Agent is responsible for managing Inox applications and services running on a single node.

func NewAgent

func NewAgent(args AgentParameters) (*Agent, error)

func (*Agent) GetApplication

func (a *Agent) GetApplication(name node.ApplicationName) (node.Application, bool)

func (*Agent) GetOrCreateApplication

func (a *Agent) GetOrCreateApplication(name node.ApplicationName) (node.Application, error)

type AgentConfig

type AgentConfig struct {
	OsProdDir                       core.Path
	TemporaryOptionRunInSameProcess bool
}

type AgentParameters

type AgentParameters struct {
	GoCtx  context.Context
	Logger zerolog.Logger
	Config AgentConfig
}

type Application

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

func (*Application) AutorestartLoop

func (app *Application) AutorestartLoop(project core.Project, appMod *core.Module, flsSnapshot core.FilesystemSnapshot)

func (*Application) PrepareDeployment

func (*Application) Status

func (app *Application) Status() node.ApplicationStatus

func (*Application) Stop

func (app *Application) Stop()

func (*Application) TimedStatus

func (app *Application) TimedStatus() node.TimedApplicationStatus

func (*Application) UnsafelyStop

func (app *Application) UnsafelyStop()

UnsafelyStop stops the app ungracefully, doing so can cause issues.

type ApplicationDeployment

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

func (*ApplicationDeployment) Perform

func (d *ApplicationDeployment) Perform() error

func (*ApplicationDeployment) Status

Jump to

Keyboard shortcuts

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