provider

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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) Start

func (p *CoreProvider) Start() error

Start starts core daemon.

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 Log

type Log struct {
	Dependency      string
	Standard, Error *chunker.Stream
}

Log keeps dependency logs of service.

type Provider

type Provider struct {
	*CoreProvider
	*ServiceProvider
}

Provider is a struct that provides all methods required by any command.

func New

New creates Provider based on given CoreClient.

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
)

Directories

Path Synopsis
Code generated by go-bindata.
Code generated by go-bindata.

Jump to

Keyboard shortcuts

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