environment

package
v0.0.0-...-7308281 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name string
	Args []string
}

type CommonEnvironment

type CommonEnvironment struct {
	Fnd         app.Foundation
	OutputMaker output.Maker
	Used        bool
	Ports       Ports
}

func (*CommonEnvironment) ContainerRegistry

func (e *CommonEnvironment) ContainerRegistry() *ContainerRegistry

func (*CommonEnvironment) IsUsed

func (e *CommonEnvironment) IsUsed() bool

func (*CommonEnvironment) MarkUsed

func (e *CommonEnvironment) MarkUsed()

func (*CommonEnvironment) PortsEnd

func (e *CommonEnvironment) PortsEnd() int32

func (*CommonEnvironment) PortsStart

func (e *CommonEnvironment) PortsStart() int32

func (*CommonEnvironment) ReservePort

func (e *CommonEnvironment) ReservePort() int32

type CommonMaker

type CommonMaker struct {
	Fnd         app.Foundation
	OutputMaker output.Maker
}

func CreateCommonMaker

func CreateCommonMaker(fnd app.Foundation) *CommonMaker

func (*CommonMaker) MakeCommonEnvironment

func (m *CommonMaker) MakeCommonEnvironment(config *types.CommonEnvironment) *CommonEnvironment

func (*CommonMaker) MakeContainerEnvironment

func (m *CommonMaker) MakeContainerEnvironment(config *types.ContainerEnvironment) *ContainerEnvironment

type ContainerEnvironment

type ContainerEnvironment struct {
	CommonEnvironment
	Registry ContainerRegistry
}

func (*ContainerEnvironment) ContainerRegistry

func (e *ContainerEnvironment) ContainerRegistry() *ContainerRegistry

type ContainerRegistry

type ContainerRegistry struct {
	Auth ContainerRegistryAuth
}

type ContainerRegistryAuth

type ContainerRegistryAuth struct {
	Username string
	Password string
}

type Environment

type Environment interface {
	Init(ctx context.Context) error
	Destroy(ctx context.Context) error
	RootPath(workspace string) string
	Mkdir(serviceName string, path string, perm os.FileMode) error
	ServiceAddress(serviceName string, port int32) string
	RunTask(ctx context.Context, ss *ServiceSettings, cmd *Command) (task.Task, error)
	ExecTaskCommand(ctx context.Context, ss *ServiceSettings, target task.Task, cmd *Command) error
	ExecTaskSignal(ctx context.Context, ss *ServiceSettings, target task.Task, signal os.Signal) error
	Output(ctx context.Context, target task.Task, outputType output.Type) (io.Reader, error)
	PortsStart() int32
	PortsEnd() int32
	ReservePort() int32
	ContainerRegistry() *ContainerRegistry
	MarkUsed()
	IsUsed() bool
}

type Maker

type Maker interface {
	MakeCommonEnvironment(config *types.CommonEnvironment) *CommonEnvironment
	MakeContainerEnvironment(config *types.ContainerEnvironment) *ContainerEnvironment
}

type Ports

type Ports struct {
	Start int32
	Used  int32
	End   int32
}

type ServiceSettings

type ServiceSettings struct {
	Name                   string
	FullName               string
	Port                   int32
	Public                 bool
	ContainerConfig        *containers.ContainerConfig
	ServerPort             int32
	ServerParameters       parameters.Parameters
	EnvironmentConfigPaths map[string]string
	EnvironmentScriptPaths map[string]string
	WorkspaceConfigPaths   map[string]string
	WorkspaceScriptPaths   map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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