services

package
v0.0.0-...-e96c845 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySQLPort = "3306"
)
View Source
const (
	PostgresPort = "5432"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Apache

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

func NewApache

func NewApache(docker *docker.Docker, name string, projectPath string, entryPoint string, config *string) *Apache

func (*Apache) ContainerName

func (a *Apache) ContainerName() string

func (*Apache) Create

func (a *Apache) Create(ctx context.Context) (string, error)

func (*Apache) Find

func (a *Apache) Find(ctx context.Context) (*types.Container, error)

func (*Apache) RenderConfig

func (a *Apache) RenderConfig() (*bytes.Buffer, error)

type MySQL

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

func NewMySQL

func NewMySQL(
	docker *docker.Docker,
	name string,
	forwardPort string,
	dbPass string,
	dbName string,
	dataPath string,
) *MySQL

func (*MySQL) ContainerName

func (m *MySQL) ContainerName() string

func (*MySQL) Create

func (m *MySQL) Create(ctx context.Context) (string, error)

func (*MySQL) Find

func (m *MySQL) Find(ctx context.Context) (*types.Container, error)

type Postgres

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

func NewPostgres

func NewPostgres(
	docker *docker.Docker,
	name string,
	forwardPort string,
	dbUser string,
	dbPass string,
	dbName string,
	pgDataPath string,
) *Postgres

func (*Postgres) ContainerName

func (p *Postgres) ContainerName() string

func (*Postgres) Create

func (p *Postgres) Create(ctx context.Context) (string, error)

func (*Postgres) Find

func (p *Postgres) Find(ctx context.Context) (*types.Container, error)

type Router

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

func (*Router) ContainerName

func (r *Router) ContainerName() string

func (*Router) Create

func (r *Router) Create(ctx context.Context) (string, error)

Create создаст контейнер роутера

func (*Router) Find

func (r *Router) Find(ctx context.Context) (*types.Container, error)

Find найдет контейнер роутера

type Service

type Service interface {
	Find(ctx context.Context) (*types.Container, error)
	Create(ctx context.Context) (string, error)
	ContainerName() string
}

func NewRouter

func NewRouter(d *docker.Docker) Service

type SiteNginx

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

func NewSiteNginx

func NewSiteNginx(
	docker *docker.Docker,
	name string,
	projectPath string,
	entryPoint string,
	pfAlias string,
	config *string,
) *SiteNginx

func (*SiteNginx) ContainerName

func (sn *SiteNginx) ContainerName() string

func (*SiteNginx) Create

func (sn *SiteNginx) Create(ctx context.Context) (string, error)

func (*SiteNginx) Find

func (sn *SiteNginx) Find(ctx context.Context) (*types.Container, error)

func (*SiteNginx) RenderConfig

func (sn *SiteNginx) RenderConfig() (*bytes.Buffer, error)

type SitePHPFPM

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

func NewSitePHPFPM

func NewSitePHPFPM(docker *docker.Docker, name string, projectPath string) *SitePHPFPM

func (*SitePHPFPM) ContainerName

func (sp *SitePHPFPM) ContainerName() string

func (*SitePHPFPM) Create

func (sp *SitePHPFPM) Create(ctx context.Context) (string, error)

func (*SitePHPFPM) Find

func (sp *SitePHPFPM) Find(ctx context.Context) (*types.Container, error)

type State

type State struct {
	ID            string
	ServiceName   string
	ContainerName string
	Active        bool
	CreateTime    time.Time
}

func ContainerState

func ContainerState(container *types.Container, projectName string) *State

ContainerState вернёт состояние контейнера

func (*State) CanStart

func (s *State) CanStart() bool

Jump to

Keyboard shortcuts

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