servers

package
v0.0.0-...-f647b64 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteJob

type RemoteJob struct {
	net.Conn
	Server    Server
	SSHConf   *ssh.ClientConfig
	Timeout   time.Duration
	Responses chan string
	Errors    chan error
	WaitGroup *sync.WaitGroup
	SpecList  *specr.SpecList
	SpecName  string
	Client    *ssh.Client
}

Remote Job

func (*RemoteJob) Read

func (r *RemoteJob) Read(b []byte) (int, error)

Read function with timeout

func (*RemoteJob) Run

func (job *RemoteJob) Run()

Runs the remote Jobs and returns results on the job channels

func (*RemoteJob) Write

func (r *RemoteJob) Write(b []byte) (int, error)

Write function with timeout

type Server

type Server struct {
	Name     string `ini:"-"` // considered Sections in config file
	Host     string
	Username string
	Spec     string
	PassAuth bool
	Password string `ini:"-"` // Not stored in config, just where it gets temporarily stored when we ask for it.
}

Represents a single remote server

func New

func New(name, host, username, spec string, passAuth bool) *Server

Assembles a new Server struct

func (*Server) PrintServerInfo

func (s *Server) PrintServerInfo()

Prints a single server config data in a table

type Servers

type Servers []Server

Slice of remote servers with attached methods

func (Servers) PrintAllServerInfo

func (servers Servers) PrintAllServerInfo()

Prints all server config data in a table

func (Servers) RemoteConfigure

func (s Servers) RemoteConfigure(search string, specList *specr.SpecList)

Run Remote Configuration on a target spec group

Jump to

Keyboard shortcuts

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