service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Delete = &cobra.Command{
	Use:   "delete",
	Short: "Delete one or many services",
	Example: `mesg-core service delete SERVICE_ID
mesg-core service delete SERVICE_ID_1 SERVICE_ID_2
mesg-core service delete --all`,
	Run:               deleteHandler,
	DisableAutoGenTag: true,
}

Delete a service to the marketplace

View Source
var Deploy = &cobra.Command{
	Use:     "deploy",
	Aliases: []string{"publish"},
	Short:   "Deploy a service",
	Long: `Deploy a service.

To get more information, see the [deploy page from the documentation](https://docs.mesg.com/guide/service/deploy-a-service.html)`,
	Example:           `mesg-core service deploy PATH_TO_SERVICE`,
	Run:               deployHandler,
	DisableAutoGenTag: true,
}

Deploy a service to the marketplace.

View Source
var Detail = &cobra.Command{
	Use:               "detail SERVICE_ID",
	Short:             "Show details of a published service",
	Args:              cobra.MinimumNArgs(1),
	Example:           "mesg-core service detail SERVICE_ID",
	Run:               detailHandler,
	DisableAutoGenTag: true,
}

Detail returns all the details of a service

View Source
var Dev = &cobra.Command{
	Use:               "dev",
	Short:             "Run your service in development mode",
	Example:           "mesg-core service dev PATH",
	Run:               devHandler,
	DisableAutoGenTag: true,
}

Dev command will run the service from a path in dev mode It will also listen for all events and outputs from the tasks

View Source
var Docs = &cobra.Command{
	Use:   "gen-doc",
	Short: "Generate the documentation for the service in a README.md file",
	Example: `mesg-core service gen-doc
mesg-core service gen-doc ./PATH_TO_SERVICE`,
	Run:               genDocHandler,
	DisableAutoGenTag: true,
}

Docs a service to the marketplace

View Source
var Execute = &cobra.Command{
	Use:               "execute",
	Short:             "Execute a task of a service",
	Example:           `mesg-core service execute SERVICE_ID`,
	Args:              cobra.ExactArgs(1),
	PreRun:            executePreRun,
	Run:               executeHandler,
	DisableAutoGenTag: true,
}

Execute a task from a service

View Source
var Init = &cobra.Command{
	Use:   "init",
	Short: "Initialize a service",
	Long: `Initialize a service by creating a mesg.yml and Dockerfile in a dedicated folder.
	
To get more information, see the page [service file from the documentation](https://docs.mesg.com/guide/service/service-file.html)`,
	Example: `mesg-core service init
mesg-core service init --name NAME --description DESCRIPTION
mesg-core service init --current`,
	Run:               initHandler,
	DisableAutoGenTag: true,
}

Init run the Init command for a service

View Source
var List = &cobra.Command{
	Use:   "list",
	Short: "List all published services",
	Long: `This command returns all published services with basic information.
Optionally, you can filter the services published by a specific developer:
To have more details, see the [detail command](mesg-core_service_detail.md).`,
	Example:           `mesg-core service list`,
	Run:               listHandler,
	DisableAutoGenTag: true,
}

List all the services

View Source
var Logs = &cobra.Command{
	Use:   "logs",
	Short: "Show the logs of a service",
	Example: `mesg-core service logs SERVICE_ID
mesg-core service logs SERVICE_ID --dependency DEPENDENCY_NAME`,
	Run:               logsHandler,
	Args:              cobra.MinimumNArgs(1),
	DisableAutoGenTag: true,
}

Logs of the core

View Source
var Start = &cobra.Command{
	Use:               "start SERVICE_ID",
	Short:             "Start a service",
	Long:              "Start a service from the published available services. You have to provide a stake value and duration.",
	Example:           `mesg-core service start SERVICE_ID`,
	Args:              cobra.MinimumNArgs(1),
	Run:               startHandler,
	DisableAutoGenTag: true,
}

Start run the start command for a service.

View Source
var Stop = &cobra.Command{
	Use:   "stop SERVICE_ID",
	Short: "Stop a service",
	Long: `Stop a service.

**WARNING:** If you stop a service with your stake duration still ongoing, you may lost your stake.
You will **NOT** get your stake back immediately. You will get your remaining stake only after a delay.
To have more explanation, see the page [stake explanation from the documentation]().`,
	Example:           `mesg-core service stop SERVICE_ID`,
	Run:               stopHandler,
	DisableAutoGenTag: true,
	Args:              cobra.MinimumNArgs(1),
}

Stop run the stop command for a service

View Source
var Test = &cobra.Command{
	Use: "test",
	Deprecated: `please use the following commands:
mesg-core service dev
mesg-core service execute`,
	DisableAutoGenTag: true,
}

Test a service.

View Source
var Validate = &cobra.Command{
	Use:   "validate",
	Short: "Validate a service file",
	Long: `Validate a service file. Check the yml format and rules.

All the definitions of the service file can be found in the page [Service File from the documentation](https://docs.mesg.com/guide/service/service-file.html).`,
	Example: `mesg-core service validate
mesg-core service validate ./SERVICE_FOLDER`,
	Run:               validateHandler,
	DisableAutoGenTag: true,
}

Validate a service

Functions

This section is empty.

Types

This section is empty.

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