paddlecloud

package
v0.1.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// RegistryCmdName is subcommand name
	RegistryCmdName = "registry"
	// RegistryPrefix is the prefix for Kubernetes secret name
	RegistryPrefix = "pcloud-registry"
)

Variables

Config is global config object for paddlecloud commandline

Functions

func KubeRegistryName

func KubeRegistryName(name string) string

KubeRegistryName add a prefix for the name

func RegistryName

func RegistryName(name string) string

RegistryName is registry secret name for PaddleCloud

Types

type DeleteCommand

type DeleteCommand struct {
}

DeleteCommand do job killings

func (*DeleteCommand) Execute

func (p *DeleteCommand) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute kill command

func (*DeleteCommand) Name

func (*DeleteCommand) Name() string

Name is subcommands name

func (*DeleteCommand) SetFlags

func (p *DeleteCommand) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags

func (*DeleteCommand) Synopsis

func (*DeleteCommand) Synopsis() string

Synopsis is subcommands synopsis

func (*DeleteCommand) Usage

func (*DeleteCommand) Usage() string

Usage is subcommands usage

type GetCommand

type GetCommand struct {
	// contains filtered or unexported fields
}

GetCommand exports get subcommand for fetching status

func (*GetCommand) Execute

func (p *GetCommand) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute get command

func (*GetCommand) Name

func (*GetCommand) Name() string

Name is subcommands name

func (*GetCommand) SetFlags

func (p *GetCommand) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags

func (*GetCommand) Synopsis

func (*GetCommand) Synopsis() string

Synopsis is subcommands synopsis

func (*GetCommand) Usage

func (*GetCommand) Usage() string

Usage is subcommands usage

type KillCommand

type KillCommand struct {
	// contains filtered or unexported fields
}

KillCommand do job killings

func (*KillCommand) Execute

func (p *KillCommand) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute kill command

func (*KillCommand) Name

func (*KillCommand) Name() string

Name is subcommands name

func (*KillCommand) SetFlags

func (p *KillCommand) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags

func (*KillCommand) Synopsis

func (*KillCommand) Synopsis() string

Synopsis is subcommands synopsis

func (*KillCommand) Usage

func (*KillCommand) Usage() string

Usage is subcommands usage

type LogsCommand

type LogsCommand struct {
	// contains filtered or unexported fields
}

LogsCommand print aggregated job logs

func (*LogsCommand) Execute

func (p *LogsCommand) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute logs command

func (*LogsCommand) Name

func (*LogsCommand) Name() string

Name is subcommands name

func (*LogsCommand) SetFlags

func (p *LogsCommand) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags

func (*LogsCommand) Synopsis

func (*LogsCommand) Synopsis() string

Synopsis is subcommands synopsis

func (*LogsCommand) Usage

func (*LogsCommand) Usage() string

Usage is subcommands usage

type RegistryCmd

type RegistryCmd struct {
	SecretName string `json:"name"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	Server     string `json:"server"`
}

RegistryCmd is Docker registry secret information

func (*RegistryCmd) Delete

func (r *RegistryCmd) Delete() error

Delete the specify registry

func (*RegistryCmd) Execute

func (r *RegistryCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute runs RegistryCmd command.

func (*RegistryCmd) Name

func (r *RegistryCmd) Name() string

Name is the subcommand name

func (*RegistryCmd) SetFlags

func (r *RegistryCmd) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags.

func (*RegistryCmd) Synopsis

func (r *RegistryCmd) Synopsis() string

Synopsis is the subcommand's synopsis

func (*RegistryCmd) Usage

func (r *RegistryCmd) Usage() string

Usage is the subcommand's usage

type SimpleFileCmd

type SimpleFileCmd struct {
}

SimpleFileCmd define the subcommand of simple file operations.

func (*SimpleFileCmd) Execute

func (p *SimpleFileCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute file ops.

func (*SimpleFileCmd) Name

func (*SimpleFileCmd) Name() string

Name is subcommands name.

func (*SimpleFileCmd) SetFlags

func (p *SimpleFileCmd) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags.

func (*SimpleFileCmd) Synopsis

func (*SimpleFileCmd) Synopsis() string

Synopsis is subcommands synopsis.

func (*SimpleFileCmd) Usage

func (*SimpleFileCmd) Usage() string

Usage is subcommands Usage.

type SubmitCmd

type SubmitCmd struct {
	Jobname     string `json:"name"`
	Jobpackage  string `json:"jobPackage"`
	Parallelism int    `json:"parallelism"`
	CPU         int    `json:"cpu"`
	GPU         int    `json:"gpu"`
	Memory      string `json:"memory"`
	Pservers    int    `json:"pservers"`
	PSCPU       int    `json:"pscpu"`
	PSMemory    string `json:"psmemory"`
	Entry       string `json:"entry"`
	Topology    string `json:"topology"`
	Datacenter  string `json:"datacenter"`
	Passes      int    `json:"passes"`
	// docker image to run jobs
	Image    string `json:"image"`
	Registry string `json:"registry"`
	// Alpha features:
	// TODO: separate API versions
	FaultTolerant bool `json:"faulttolerant"`
}

SubmitCmd define the subcommand of submitting paddle training jobs.

func (*SubmitCmd) Execute

func (p *SubmitCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

Execute submit command.

func (*SubmitCmd) Name

func (*SubmitCmd) Name() string

Name is subcommands name.

func (*SubmitCmd) SetFlags

func (p *SubmitCmd) SetFlags(f *flag.FlagSet)

SetFlags registers subcommands flags.

func (*SubmitCmd) Synopsis

func (*SubmitCmd) Synopsis() string

Synopsis is subcommands synopsis.

func (*SubmitCmd) Usage

func (*SubmitCmd) Usage() string

Usage is subcommands Usage.

type Submitter

type Submitter struct {
	// contains filtered or unexported fields
}

Submitter submit job to cloud.

func NewSubmitter

func NewSubmitter(cmd *SubmitCmd) *Submitter

NewSubmitter returns a submitter object.

func (*Submitter) Submit

func (s *Submitter) Submit(jobPackage string, jobName string) error

Submit current job.

Jump to

Keyboard shortcuts

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