client

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 22 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, et *time.Time, timeFormat, timeZone string) 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 NewK8sClient added in v0.10.0

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

NewK8sClient ...

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, et *time.Time, timeFormat, timeZone string) error

Read ...

func (*FileClient) Tailf

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

Tailf ...

type K8sClient added in v0.10.0

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

func (*K8sClient) Copy added in v0.10.0

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

Copy ...

func (*K8sClient) Ls added in v0.10.0

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

Ls ...

func (*K8sClient) Out added in v0.10.0

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

Out ...

func (*K8sClient) RandomOne added in v0.10.0

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

RandomOne ...

func (*K8sClient) Read added in v0.10.0

func (c *K8sClient) Read(ctx context.Context, st, et *time.Time, timeFormat, timeZone string) error

Read ...

func (*K8sClient) Stream added in v0.10.0

func (c *K8sClient) Stream(ctx context.Context, follow bool, sinceSeconds, tailLines *int64) error

Stream ...

func (*K8sClient) Tailf added in v0.10.0

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

Tailf ...

type Line

type Line struct {
	Host               string
	Path               string
	Content            string
	TimeZone           string
	TimestampViaClient *time.Time
}

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, et *time.Time, timeFormat, timeZone string) error

Read ...

func (*SSHClient) Tailf

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

Tailf ...

type Tail added in v0.10.0

type Tail struct {
	ContextName   string
	Namespace     string
	PodName       string
	ContainerName string
	Closed        bool
	// contains filtered or unexported fields
}

func NewTail added in v0.10.0

func NewTail(l *zap.Logger, lineChan chan Line, contextName, namespace, podName, containerName string) *Tail

NewTail returns a new tail for a Kubernetes container inside a pod

func (*Tail) Close added in v0.10.0

func (t *Tail) Close()

Close stops tailing

func (*Tail) Start added in v0.10.0

func (t *Tail) Start(ctx context.Context, i v1.PodInterface, follow bool, sinceSeconds, tailLines *int64)

Start starts tailing

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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