Documentation
¶
Index ¶
- type CoreProvider
- type DeployStatus
- type Log
- type Provider
- type ServiceProvider
- func (p *ServiceProvider) ServiceByID(id string) (*coreapi.Service, error)
- func (p *ServiceProvider) ServiceDelete(deleteData bool, ids ...string) error
- func (p *ServiceProvider) ServiceDeleteAll(deleteData bool) error
- func (p *ServiceProvider) ServiceDeploy(path string, env map[string]string, statuses chan DeployStatus) (id string, validationError, err error)
- func (p *ServiceProvider) ServiceExecuteTask(id, taskKey, inputData string, tags []string) error
- func (p *ServiceProvider) ServiceGenerateDocs(path string) error
- func (p *ServiceProvider) ServiceInitDownloadTemplate(t *servicetemplate.Template, dst string) error
- func (p *ServiceProvider) ServiceInitTemplateList() ([]*servicetemplate.Template, error)
- func (p *ServiceProvider) ServiceList() ([]*coreapi.Service, error)
- func (p *ServiceProvider) ServiceListenEvents(id, eventFilter string) (chan *coreapi.EventData, chan error, error)
- func (p *ServiceProvider) ServiceListenResults(id, taskFilter, outputFilter string, tagFilters []string) (chan *coreapi.ResultData, chan error, error)
- func (p *ServiceProvider) ServiceLogs(id string, dependencies ...string) (logs []*Log, close func(), err error)
- func (p *ServiceProvider) ServiceStart(id string) error
- func (p *ServiceProvider) ServiceStop(id string) error
- func (p *ServiceProvider) ServiceValidate(path string) (string, error)
- type StatusType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreProvider ¶
type CoreProvider struct {
// contains filtered or unexported fields
}
CoreProvider is a struct that provides all methods required by core command.
func NewCoreProvider ¶
func NewCoreProvider(client coreapi.CoreClient, d daemon.Daemon) *CoreProvider
NewCoreProvider creates new CoreProvider.
func (*CoreProvider) Logs ¶
func (p *CoreProvider) Logs() (io.ReadCloser, error)
Logs returns daemon logs reader.
func (*CoreProvider) Status ¶
func (p *CoreProvider) Status() (container.StatusType, error)
Status returns daemon status.
func (*CoreProvider) Stop ¶
func (p *CoreProvider) Stop() error
Stop stops core daemon and all running services.
type DeployStatus ¶
type DeployStatus struct { Message string Type StatusType }
DeployStatus represents the deployment status.
type Provider ¶
type Provider struct { *CoreProvider *ServiceProvider }
Provider is a struct that provides all methods required by any command.
type ServiceProvider ¶
type ServiceProvider struct {
// contains filtered or unexported fields
}
ServiceProvider is a struct that provides all methods required by service command.
func NewServiceProvider ¶
func NewServiceProvider(c coreapi.CoreClient) *ServiceProvider
NewServiceProvider creates new ServiceProvider.
func (*ServiceProvider) ServiceByID ¶
func (p *ServiceProvider) ServiceByID(id string) (*coreapi.Service, error)
ServiceByID finds service based on given id.
func (*ServiceProvider) ServiceDelete ¶
func (p *ServiceProvider) ServiceDelete(deleteData bool, ids ...string) error
ServiceDelete deletes service with given ids.
func (*ServiceProvider) ServiceDeleteAll ¶
func (p *ServiceProvider) ServiceDeleteAll(deleteData bool) error
ServiceDeleteAll deletes all services.
func (*ServiceProvider) ServiceDeploy ¶
func (p *ServiceProvider) ServiceDeploy(path string, env map[string]string, statuses chan DeployStatus) (id string, validationError, err error)
ServiceDeploy deploys service from given path.
func (*ServiceProvider) ServiceExecuteTask ¶
func (p *ServiceProvider) ServiceExecuteTask(id, taskKey, inputData string, tags []string) error
ServiceExecuteTask executes task on given service.
func (*ServiceProvider) ServiceGenerateDocs ¶
func (p *ServiceProvider) ServiceGenerateDocs(path string) error
ServiceGenerateDocs creates docs in given path.
func (*ServiceProvider) ServiceInitDownloadTemplate ¶
func (p *ServiceProvider) ServiceInitDownloadTemplate(t *servicetemplate.Template, dst string) error
ServiceInitDownloadTemplate download given service template.
func (*ServiceProvider) ServiceInitTemplateList ¶
func (p *ServiceProvider) ServiceInitTemplateList() ([]*servicetemplate.Template, error)
ServiceInitTemplateList downloads services templates list from awesome github repo.
func (*ServiceProvider) ServiceList ¶
func (p *ServiceProvider) ServiceList() ([]*coreapi.Service, error)
ServiceList lists all services.
func (*ServiceProvider) ServiceListenEvents ¶
func (p *ServiceProvider) ServiceListenEvents(id, eventFilter string) (chan *coreapi.EventData, chan error, error)
ServiceListenEvents returns a channel with event data streaming..
func (*ServiceProvider) ServiceListenResults ¶
func (p *ServiceProvider) ServiceListenResults(id, taskFilter, outputFilter string, tagFilters []string) (chan *coreapi.ResultData, chan error, error)
ServiceListenResults returns a channel with event results streaming..
func (*ServiceProvider) ServiceLogs ¶
func (p *ServiceProvider) ServiceLogs(id string, dependencies ...string) (logs []*Log, close func(), err error)
ServiceLogs returns logs reader for all service dependencies.
func (*ServiceProvider) ServiceStart ¶
func (p *ServiceProvider) ServiceStart(id string) error
ServiceStart starts a service.
func (*ServiceProvider) ServiceStop ¶
func (p *ServiceProvider) ServiceStop(id string) error
ServiceStop stops a service.
func (*ServiceProvider) ServiceValidate ¶
func (p *ServiceProvider) ServiceValidate(path string) (string, error)
ServiceValidate validates a service configuration and Dockerfile.
type StatusType ¶
type StatusType int
StatusType indicates the type of status message.
const ( // Running indicates that status message belongs to a continuous state. Running StatusType // DonePositive indicates that status message belongs to a positive noncontinuous state. DonePositive // DoneNegative indicates that status message belongs to a negative noncontinuous state. DoneNegative )