client

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Read(ctx context.Context, st *time.Time, et *time.Time) error
	Tailf(ctx context.Context) error
	RandomOne(ctx context.Context) error
	Ls(ctx context.Context, st *time.Time, et *time.Time) error
	Copy(ctx context.Context, filePath string, dstDir string) error
	Out() <-chan Line
}

Client ...

func NewFileClient

func NewFileClient(l *zap.Logger, path string) (Client, error)

NewFileClient ...

func NewSSHClient

func NewSSHClient(l *zap.Logger, host string, user string, port int, path string, passphrase []byte) (Client, error)

NewSSHClient ...

type FileClient

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

FileClient ...

func (*FileClient) Copy added in v0.4.0

func (c *FileClient) Copy(ctx context.Context, filePath string, dstDir string) error

Copy ...

func (*FileClient) Exec

func (c *FileClient) Exec(ctx context.Context, cmdStr string) error

Exec ...

func (*FileClient) Ls added in v0.4.0

func (c *FileClient) Ls(ctx context.Context, st *time.Time, et *time.Time) error

Ls ...

func (*FileClient) Out

func (c *FileClient) Out() <-chan Line

Out ...

func (*FileClient) RandomOne added in v0.2.0

func (c *FileClient) RandomOne(ctx context.Context) error

RandomOne ...

func (*FileClient) Read

func (c *FileClient) Read(ctx context.Context, st *time.Time, et *time.Time) error

Read ...

func (*FileClient) Tailf

func (c *FileClient) Tailf(ctx context.Context) error

Tailf ...

type Line

type Line struct {
	Host     string
	Path     string
	Content  string
	TimeZone string
}

Line ...

type SSHClient

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

SSHClient ...

func (*SSHClient) Copy added in v0.4.0

func (c *SSHClient) Copy(ctx context.Context, filePath string, dstDir string) error

Copy ...

func (*SSHClient) Exec

func (c *SSHClient) Exec(ctx context.Context, cmd string) error

Exec ...

func (*SSHClient) Ls added in v0.4.0

func (c *SSHClient) Ls(ctx context.Context, st *time.Time, et *time.Time) error

Ls ...

func (*SSHClient) Out

func (c *SSHClient) Out() <-chan Line

Out ...

func (*SSHClient) RandomOne added in v0.2.0

func (c *SSHClient) RandomOne(ctx context.Context) error

RandomOne ...

func (*SSHClient) Read

func (c *SSHClient) Read(ctx context.Context, st *time.Time, et *time.Time) error

Read ...

func (*SSHClient) Tailf

func (c *SSHClient) Tailf(ctx context.Context) error

Tailf ...

Jump to

Keyboard shortcuts

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