poll

package
v0.0.0-...-2a546f5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Directory for downloaded files
	TempDir string

	// True to only show commands w/o executing them
	DryRun bool

	// URL:port of the sftp server to poll
	HostPort string

	// ssh configuration
	Ssh *ssh.ClientConfig
}

type Poller

type Poller interface {
	io.Closer
	Updates() <-chan *Update
}

func New

func New(snapshot map[string]time.Time, ctx context.Context, config *Config, remoteRoot string) (Poller, error)

type Update

type Update struct {
	Path      string
	Timestamp time.Time
}

Update represents either a poller downloaded artefact, or describes a remote file entry

Jump to

Keyboard shortcuts

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