appconfig

package
v0.0.0-...-6718c53 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2016 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppNotExist           = errors.New("App does not exist.")
	MetaError             = errors.New("Load app meta error.")
	ValidateShellNotExist = errors.New("Shell for validation does not exist.")
	RegisterShellNotExist = errors.New("Shell for registration does not exist.")
	ConfigCenterLock      = new(sync.RWMutex)
)
View Source
var HTTPRequestError = errors.New("Request error.")

Functions

func NewConfigCenter

func NewConfigCenter(appHome string) error

Types

type BaseCenter

type BaseCenter struct {
	AppCenter string
}

func (*BaseCenter) AppPath

func (config *BaseCenter) AppPath(appId string) string

func (*BaseCenter) Inspect

func (config *BaseCenter) Inspect(container *docker.Container) (ipAddress string, hostName string, envKv map[string]string)

func (*BaseCenter) LoadAppMeta

func (config *BaseCenter) LoadAppMeta(body []byte) (*warden.AppMeta, error)

type ConfigCenter

type ConfigCenter interface {
	Exists(appId string) (bool, error)
	GetAppMeta(appId string) (*warden.AppMeta, error)
	GetApp(appId string) (*warden.Application, error)
	GetDaemonApp(container *docker.Container) (*warden.DaemonApplication, error)
}

func AppConfigCenter

func AppConfigCenter() ConfigCenter

type DirectoryCenter

type DirectoryCenter struct {
	*BaseCenter
}

func (*DirectoryCenter) Exists

func (config *DirectoryCenter) Exists(appId string) (bool, error)

func (*DirectoryCenter) GetApp

func (config *DirectoryCenter) GetApp(appId string) (*warden.Application, error)

func (*DirectoryCenter) GetAppMeta

func (config *DirectoryCenter) GetAppMeta(appId string) (*warden.AppMeta, error)

func (*DirectoryCenter) GetDaemonApp

func (config *DirectoryCenter) GetDaemonApp(container *docker.Container) (*warden.DaemonApplication, error)

type HTTPCenter

type HTTPCenter struct {
	*BaseCenter
}

func (*HTTPCenter) Download

func (config *HTTPCenter) Download(src string, dest string) error

func (*HTTPCenter) Exists

func (config *HTTPCenter) Exists(appId string) (bool, error)

func (*HTTPCenter) GetApp

func (config *HTTPCenter) GetApp(appId string) (*warden.Application, error)

func (*HTTPCenter) GetAppMeta

func (config *HTTPCenter) GetAppMeta(appId string) (*warden.AppMeta, error)

func (*HTTPCenter) GetDaemonApp

func (config *HTTPCenter) GetDaemonApp(container *docker.Container) (*warden.DaemonApplication, error)

func (*HTTPCenter) GetFile

func (config *HTTPCenter) GetFile(src string, dest string) error

Jump to

Keyboard shortcuts

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