handlers

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHandler

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

ClientHandler is the basic client handler interface.

func NewClientHandler

func NewClientHandler(server string, pingTimeout int) *ClientHandler

NewClientHandler creates a new client handler.

func (*ClientHandler) Ping

func (h *ClientHandler) Ping() error

Used to determine whether server is still responding to requests or not.

func (*ClientHandler) Read

func (h *ClientHandler) Read(p []byte) (n int, err error)

Send data to the dtail server via Reader interface.

func (*ClientHandler) SendCommand

func (h *ClientHandler) SendCommand(command string) error

func (*ClientHandler) Server

func (h *ClientHandler) Server() string

func (*ClientHandler) Stop

func (h *ClientHandler) Stop()

Stop the handler.

func (*ClientHandler) Write

func (h *ClientHandler) Write(p []byte) (n int, err error)

Read data from the dtail server via Writer interface.

type Handler

type Handler interface {
	io.ReadWriter
	Ping() error
	Stop()
	SendCommand(command string) error
	Server() string
}

Handler provides all methods which can be run on any client handler.

type HealthHandler

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

HealthHandler implements the handler required for health checks.

func NewHealthHandler

func NewHealthHandler(server string, receive chan<- string) *HealthHandler

NewHealthHandler returns a new health check handler.

func (*HealthHandler) Ping

func (h *HealthHandler) Ping() error

Ping is not of use for health check handler.

func (*HealthHandler) Read

func (h *HealthHandler) Read(p []byte) (n int, err error)

Server reads byte stream from client.

func (*HealthHandler) SendCommand

func (h *HealthHandler) SendCommand(command string) error

SendCommand send a DTail command to the server.

func (*HealthHandler) Server

func (h *HealthHandler) Server() string

Server returns the remote server name.

func (*HealthHandler) Stop

func (h *HealthHandler) Stop()

Stop is not of use for health check handler.

func (*HealthHandler) Write

func (h *HealthHandler) Write(p []byte) (n int, err error)

Server writes byte stream to client.

type MaprHandler

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

MaprHandler is the handler used on the client side for running mapreduce aggregations.

func NewMaprHandler

func NewMaprHandler(server string, query *mapr.Query, globalGroup *mapr.GlobalGroupSet, pingTimeout int) *MaprHandler

NewMaprHandler returns a new mapreduce client handler.

func (*MaprHandler) Ping

func (h *MaprHandler) Ping() error

Used to determine whether server is still responding to requests or not.

func (*MaprHandler) Read

func (h *MaprHandler) Read(p []byte) (n int, err error)

Send data to the dtail server via Reader interface.

func (*MaprHandler) SendCommand

func (h *MaprHandler) SendCommand(command string) error

func (*MaprHandler) Server

func (h *MaprHandler) Server() string

func (*MaprHandler) Stop

func (h *MaprHandler) Stop()

Stop stops the mapreduce client handler.

func (*MaprHandler) Write

func (h *MaprHandler) Write(p []byte) (n int, err error)

Read data from the dtail server via Writer interface.

Jump to

Keyboard shortcuts

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