kvs

package
v0.0.0-...-720eb87 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NextNode

type NextNode struct {
	Host net.TCPAddr
}

type QueueManager

type QueueManager struct {
	QueuePrimary   redis.Conn
	QueueSecondary redis.Conn
	Queue          []UpdateQueue
	NextNode       *NextNode // Next node when replacing kvs node
	// contains filtered or unexported fields
}

func NewQueueManager

func NewQueueManager() *QueueManager

func (*QueueManager) Enqueue

func (q *QueueManager) Enqueue(u UpdateQueue)

func (*QueueManager) Forward

func (q *QueueManager) Forward()

func (*QueueManager) Length

func (q *QueueManager) Length() int

type QueueManagerI

type QueueManagerI interface {
	Enqueue(u UpdateQueue)
	Forward()
}

type UpdateQueue

type UpdateQueue struct {
	Data     string `json:"data"`
	Key      string `json:"key"`
	UpdateAt int64  `json:"update_at"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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