n0deploy

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSshCopyInstruction

func NewSshCopyInstruction(s *ssh.Client) func(string, string) (Instruction, error)

func NewSshRunInstruction

func NewSshRunInstruction(s *ssh.Client) func(string) (Instruction, error)

func ValidateCopy

func ValidateCopy(line string) (string, string, error)

ValidateCopy return source and destination to copy file

Types

type BlockType

type BlockType int
const (
	BlockType_BOOTSTRAP BlockType = iota
	BlockType_DEPLOY
)

type Instruction

type Instruction interface {
	Do(ctx context.Context, out io.Writer) error
	String() string
}

func NewLocalCopyInstruction

func NewLocalCopyInstruction(src, dst string) (Instruction, error)

func NewLocalRunInstruction

func NewLocalRunInstruction(line string) (Instruction, error)

type LocalCopyInstruction

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

func (LocalCopyInstruction) Do

func (LocalCopyInstruction) String

func (i LocalCopyInstruction) String() string

type LocalRunInstruction

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

func (LocalRunInstruction) Do

func (LocalRunInstruction) String

func (i LocalRunInstruction) String() string

type N0deploy

type N0deploy struct {
	Bootstrap []Instruction
	Deploy    []Instruction
}

type Parser

type Parser struct {
	NewRunInstruction  func(command string) (Instruction, error)
	NewCopyInstruction func(src, dst string) (Instruction, error)
}

func NewLocalParser

func NewLocalParser() *Parser

func NewSshParser

func NewSshParser(s *ssh.Client) *Parser

func (Parser) Parse

func (p Parser) Parse(src string) (*N0deploy, error)

type SshCopyInstruction

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

func (SshCopyInstruction) Do

func (SshCopyInstruction) String

func (i SshCopyInstruction) String() string

type SshRunInstruction

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

func (SshRunInstruction) Do

func (SshRunInstruction) String

func (i SshRunInstruction) String() string

Jump to

Keyboard shortcuts

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