services

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Maker

type Maker interface {
	Make(
		config map[string]types.Service,
		dflts *defaults.Defaults,
		scriptResources scripts.Scripts,
		srvs servers.Servers,
		environments environments.Environments,
		instanceName string,
		instanceIdx int,
		instanceWorkspace string,
	) (ServiceLocator, error)
}

func CreateMaker

func CreateMaker(fnd app.Foundation, parametersMaker parameters.Maker) Maker

type Service

type Service interface {
	LocalAddress() string
	PrivateAddress() string
	PrivateUrl() (string, error)
	PublicUrl(path string) (string, error)
	Pid() (int, error)
	Name() string
	FullName() string
	Executable() (string, error)
	User() string
	Group() string
	Dirs() map[dir.DirType]string
	ConfDir() (string, error)
	RunDir() (string, error)
	ScriptDir() (string, error)
	Port() int32
	EnvironmentConfigPaths() map[string]string
	WorkspaceConfigPaths() map[string]string
	EnvironmentScriptPaths() map[string]string
	WorkspaceScriptPaths() map[string]string
	Environment() environment.Environment
	Task() task.Task
	RenderTemplate(text string, params parameters.Parameters) (string, error)
	OutputScanner(ctx context.Context, outputType output.Type) (*bufio.Scanner, error)
	Sandbox() sandbox.Sandbox
	Server() servers.Server
	ServerParameters() parameters.Parameters
	Reload(ctx context.Context) error
	Restart(ctx context.Context) error
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	IsPublic() bool
	Workspace() string
	SetTemplate(template template.Template)
}

type ServiceLocator

type ServiceLocator interface {
	Find(name string) (Service, error)
	Services() Services
}

func NewServiceLocator

func NewServiceLocator(services Services) ServiceLocator

type Services

type Services map[string]Service

func (Services) AddService

func (s Services) AddService(service Service)

func (Services) FindService

func (s Services) FindService(name string) (Service, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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