clientserver

package
v0.0.0-...-e6e2d5c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const VersionsHeader = "versions"

Variables

This section is empty.

Functions

func ClientBlockReader

func ClientBlockReader(reader *bufio.Reader, routers []chan []byte, termimator *sync.WaitGroup)

func ServerDataCompressor

func ServerDataCompressor(client *Client, pipe int, compression int,
	inCh <-chan compressor.CompressableData, outCh chan<- compressor.CompressedData)

func ServerDataStreaming

func ServerDataStreaming(client *Client, pipe int, inCh <-chan compressor.CompressedData, outCh chan<- compressor.TheMessage)

Types

type Client

type Client struct {
	// static
	Databases []int
	Versions  []int64
	Conn      net.Conn
	Reader    *bufio.Reader
	Conntype  string
	ID        string

	Info      map[string]string
	Handshake map[string]string

	TerminateChain func()

	TSStart time.Time

	//  static pipeline - no need to keep just for debugging
	//-- remove channels from client's structure after debugging
	//	KVFullScan   []chan []Reader.PKVData
	KVPartSink   []chan reader.VersionData
	MsgSink      []chan compressor.CompressableData
	DataBreakers []chan compressor.CompressedData
	BlockDrains  []chan compressor.TheMessage

	SocketDrain <-chan compressor.TheMessage

	//	watchers
	// Control
	Finished sync.WaitGroup
	Control  chan control.ControlMessage
	Alive    chan int // never being sent just close on quit

	TSSynced       []time.Time
	TSLatestUpdate []time.Time
	//	SyncVolume []int64
	Stats ClientStats
	// contains filtered or unexported fields
}

func (*Client) DoneMsg

func (client *Client) DoneMsg()

func (*Client) Init

func (client *Client) Init(ldbs int)

func (*Client) ParseHeader

func (client *Client) ParseHeader(line string)

func (*Client) Terminate

func (client *Client) Terminate()

type ClientStats

type ClientStats struct {
	Produced   []int64
	Compressed []int64
}

func (*ClientStats) Init

func (client *ClientStats) Init(ldbs int)

Jump to

Keyboard shortcuts

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