engine

package
v0.0.0-...-cd5e839 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factories

func Factories() map[string]Factory

Factories of engines

func Supervising

func Supervising(supervisee Supervisee) error

Supervising supervise a supervisee

Types

type Engine

type Engine interface {
	io.Closer
	Name() string
	Prepare([]openedge.ServiceInfo)
	Run(openedge.ServiceInfo, map[string]openedge.VolumeInfo) (Service, error)
}

Engine interface

func New

func New(name string, grace time.Duration, wdir string) (Engine, error)

New engine by given name

type Factory

type Factory func(grace time.Duration, wdir string) (Engine, error)

Factory create engine by given config

type Instance

type Instance interface {
	ID() string
	Name() string
	Supervisee
	io.Closer
}

Instance interfaces of instance

type Service

type Service interface {
	Name() string
	Stats() openedge.ServiceStatus
	Start() error
	Stop()
	StartInstance(instanceName string, dynamicConfig map[string]string) error
	StopInstance(instanceName string) error
}

Service interfaces of service

type Supervisee

type Supervisee interface {
	Log() logger.Logger
	Policy() openedge.RestartPolicyInfo
	Wait(w chan<- error)
	Dying() <-chan struct{}
	Restart() error
	Stop()
}

Supervisee supervisee supervised by supervisor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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