clients

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Mode              omode.Mode
	ServersStr        string
	UserName          string
	Files             string
	Regex             string
	TrustAllHosts     bool
	Discovery         string
	ConnectionsPerCPU int
	PingTimeout       int
}

Args is a helper struct to summarize common client arguments.

type CatClient

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

CatClient is a client for returning a whole file from the beginning to the end.

func NewCatClient

func NewCatClient(args Args) (*CatClient, error)

NewCatClient returns a new cat client.

func (*CatClient) Start

func (c *CatClient) Start() (status int)

func (*CatClient) Stop

func (c *CatClient) Stop()

func (*CatClient) WaitC

func (c *CatClient) WaitC() <-chan struct{}

type Client

type Client interface {
	Start() int
	Stop()
}

Client is the interface for the end user command line client.

type GrepClient

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

GrepClient searches a remote file for all lines matching a regular expression. Only the matching lines are displayed.

func NewGrepClient

func NewGrepClient(args Args) (*GrepClient, error)

NewGrepClient creates a new grep client.

func (*GrepClient) Start

func (c *GrepClient) Start() (status int)

func (*GrepClient) Stop

func (c *GrepClient) Stop()

func (*GrepClient) WaitC

func (c *GrepClient) WaitC() <-chan struct{}

type HealthClient

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

HealthClient is used for health checking (e.g. via Nagios)

func NewHealthClient

func NewHealthClient(mode omode.Mode) (*HealthClient, error)

NewHealthClient returns a new healh client.

func (*HealthClient) Start

func (c *HealthClient) Start() (status int)

Start the health client.

type MaprClient

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

MaprClient is used for running mapreduce aggregations on remote files.

func NewMaprClient

func NewMaprClient(args Args, queryStr string) (*MaprClient, error)

NewMaprClient returns a new mapreduce client.

func (*MaprClient) Start

func (c *MaprClient) Start() (status int)

Start starts the mapreduce client.

func (*MaprClient) Stop

func (c *MaprClient) Stop()

func (*MaprClient) WaitC

func (c *MaprClient) WaitC() <-chan struct{}

type TailClient

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

TailClient is used for tailing remote log files (opening, seeking to the end and returning only new incoming lines).

func NewTailClient

func NewTailClient(args Args) (*TailClient, error)

NewTailClient returns a new TailClient.

func (*TailClient) Start

func (c *TailClient) Start() (status int)

func (*TailClient) Stop

func (c *TailClient) Stop()

func (*TailClient) WaitC

func (c *TailClient) WaitC() <-chan struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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