Help us shape the future of Go! Take the 2026 Go Developer Survey

embeddedui

package
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package embeddedui manages embedded UI container.

Index

Constants

View Source
const (
	// EnvEngineName defines the environment variable name to pass a DLE hostname to container.
	EnvEngineName = "DLE_HOST"

	// EnvEnginePort defines the environment variable name to pass a DLE port to container.
	EnvEnginePort = "DLE_PORT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled     bool   `yaml:"enabled"`
	DockerImage string `yaml:"dockerImage"`
	Host        string `yaml:"host"`
	Port        int    `yaml:"port"`
}

Config defines configs for a embedded UI container.

type UIManager

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

UIManager manages embedded UI container.

func New

func New(cfg Config, engProps global.EngineProps, runner runners.Runner, docker *client.Client) *UIManager

New creates a new UI Manager.

func (*UIManager) Reload

func (ui *UIManager) Reload(ctx context.Context, cfg Config) error

Reload reloads configuration of UI manager and adjusts a UI container according to it.

func (*UIManager) Restart

func (ui *UIManager) Restart(ctx context.Context) error

Restart destroys and creates a new embedded UI container.

func (*UIManager) Run

func (ui *UIManager) Run(ctx context.Context) error

Run creates a new embedded UI container.

func (*UIManager) Stop

func (ui *UIManager) Stop(ctx context.Context)

Stop removes a embedded UI container.

Jump to

Keyboard shortcuts

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