application

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationTableHeader

func ApplicationTableHeader() string

func NewLayout

func NewLayout() *tview.Grid

Types

type Application

type Application struct {
	Name string
	Port int

	Pid int

	Path         string
	StartCommand []string
	StopCommand  []string
	Env          []string
	Logger       *Logger

	URL    string
	Branch string
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(conf config.ApplicationConfig, logger *Logger) Application

func (Application) ActionLabels

func (app Application) ActionLabels() []string

func (*Application) DisplayTableCellText

func (app *Application) DisplayTableCellText() string

func (Application) LaunchMessage

func (app Application) LaunchMessage() string

func (*Application) SetStatus

func (app *Application) SetStatus(status ApplicationStatus)

func (*Application) Start

func (app *Application) Start() *Application

Start is start application

func (*Application) Stop

func (app *Application) Stop() *Application

Stop is sends a signal to the process to stop it.

type ApplicationStatus

type ApplicationStatus int
const (
	Starting ApplicationStatus = iota
	Running
	Stopped
	Error
)

func (ApplicationStatus) String

func (a ApplicationStatus) String() string

type LogWriter

type LogWriter interface {
	Write(p []byte) (n int, err error)
}

type Logger

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

func NewLogger

func NewLogger(applicationName string, bw LogWriter) *Logger

func (Logger) Write

func (l Logger) Write(p []byte) (n int, err error)

type TuiApplicationManager

type TuiApplicationManager struct {
	Layout *tview.Grid
	// Page for application list
	ApplicationPages *tview.Pages
	// Page for application log
	LogPages *tview.Pages
	// This table displays a list of applications.
	// One application is displayed per row.
	ApplicationTable *tview.Table
	// contains filtered or unexported fields
}

func NewTuiApplicationManager

func NewTuiApplicationManager(applicationConfig []config.ApplicationConfig) *TuiApplicationManager

func (*TuiApplicationManager) AddApplicationView

func (m *TuiApplicationManager) AddApplicationView(applications []Application) *TuiApplicationManager

func (*TuiApplicationManager) AddLogView

func (*TuiApplicationManager) PopupApplicationActionModal

func (m *TuiApplicationManager) PopupApplicationActionModal(row, column int)

PopupApplicationActionModal is displays a modal for operating the application

func (*TuiApplicationManager) PopupExitAppmanConfirmModal added in v0.0.4

func (m *TuiApplicationManager) PopupExitAppmanConfirmModal()

func (*TuiApplicationManager) Refresh

func (m *TuiApplicationManager) Refresh(interval time.Duration)

func (*TuiApplicationManager) Run

func (m *TuiApplicationManager) Run() error

func (*TuiApplicationManager) SetupCleanupFunction

func (m *TuiApplicationManager) SetupCleanupFunction()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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