Documentation ¶
Index ¶
- Variables
- func NewConfigCenter(appHome string) error
- type BaseCenter
- type ConfigCenter
- type DirectoryCenter
- func (config *DirectoryCenter) Exists(appId string) (bool, error)
- func (config *DirectoryCenter) GetApp(appId string) (*warden.Application, error)
- func (config *DirectoryCenter) GetAppMeta(appId string) (*warden.AppMeta, error)
- func (config *DirectoryCenter) GetDaemonApp(container *docker.Container) (*warden.DaemonApplication, error)
- type HTTPCenter
- func (config *HTTPCenter) Download(src string, dest string) error
- func (config *HTTPCenter) Exists(appId string) (bool, error)
- func (config *HTTPCenter) GetApp(appId string) (*warden.Application, error)
- func (config *HTTPCenter) GetAppMeta(appId string) (*warden.AppMeta, error)
- func (config *HTTPCenter) GetDaemonApp(container *docker.Container) (*warden.DaemonApplication, error)
- func (config *HTTPCenter) GetFile(src string, dest string) error
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 ¶
Types ¶
type BaseCenter ¶
type BaseCenter struct {
AppCenter string
}
func (*BaseCenter) AppPath ¶
func (config *BaseCenter) AppPath(appId 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) 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) 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)
Click to show internal directories.
Click to hide internal directories.