operation

package
v0.0.0-...-3dc5271 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {

	// Exec do operation
	Exec(class *model.Class, op *model.Operation, args map[string]string) error
}

Environment where all resources deployed

type Executor

type Executor interface {
	// Perform an operation of class.
	Perform(env string, class *model.Class, operation string, args map[string]string) error
}

Executor perform an operation of class.

type ExecutorImpl

type ExecutorImpl struct {
	Standalone Environment                `inject:"env_standalone"`
	Ssh        Environment                `inject:"env_ssh"`
	Rpc        Environment                `inject:"env_rpc"`
	ClassRep   repository.ClassRepository `inject:""`
}

ExecutorImpl select the environment by class and invoke it

func (*ExecutorImpl) Perform

func (p *ExecutorImpl) Perform(envType string, class *model.Class, operation string, args map[string]string) error

type RpcEnvironment

type RpcEnvironment struct {
	ScriptRepository repository.ScriptRepository `inject:"script_rep_standalone"`
}

RpcEnvironment where nerv add worker cluster.

func (*RpcEnvironment) Exec

func (p *RpcEnvironment) Exec(class *model.Class, operation *model.Operation, args map[string]string) error

type SshEnvironment

type SshEnvironment struct {
	ScriptRepository repository.ScriptRepository `inject:"script_rep_standalone"`
}

SshEnvironment where nerv add worker cluster.

func (*SshEnvironment) Exec

func (p *SshEnvironment) Exec(class *model.Class, operation *model.Operation, args map[string]string) error

type StandaloneEnvironment

type StandaloneEnvironment struct {
	ScriptRepository repository.ScriptRepository `inject:"script_rep_standalone"`
}

StandaloneEnvironment where nerv deployed in standalone mode

func (*StandaloneEnvironment) Exec

func (p *StandaloneEnvironment) Exec(class *model.Class, operation *model.Operation, args map[string]string) error

Jump to

Keyboard shortcuts

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