election

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TcpProxy

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

func NewTcpProxy

func NewTcpProxy(port int, to func() string) *TcpProxy

func (*TcpProxy) Close

func (t *TcpProxy) Close() error

func (*TcpProxy) Forward

func (t *TcpProxy) Forward() error

func (*TcpProxy) Reset

func (t *TcpProxy) Reset() error

type TimeoutConn

type TimeoutConn struct {
	Conn    net.Conn
	Timeout time.Duration
}

func (TimeoutConn) Read

func (i TimeoutConn) Read(buf []byte) (int, error)

func (TimeoutConn) Write

func (i TimeoutConn) Write(buf []byte) (int, error)

type Watcher

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

func New

func New(client metadata.Client, port int, command []string) *Watcher

func NewSrcDstWatcher

func NewSrcDstWatcher(client metadata.Client, srcPort, dstPort int) *Watcher

func (*Watcher) Forwarder

func (w *Watcher) Forwarder() error

func (*Watcher) GetSelfServiceLeader

func (w *Watcher) GetSelfServiceLeader() (metadata.Container, bool, error)

func (*Watcher) IsLeader

func (w *Watcher) IsLeader() bool

func (*Watcher) Watch

func (w *Watcher) Watch() error

Jump to

Keyboard shortcuts

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