common

package
v0.0.0-...-c817ce6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tick = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entries

type Entries []Entry

func CreateEntries

func CreateEntries() *Entries

func (Entries) Len

func (eh Entries) Len() int

func (Entries) Less

func (eh Entries) Less(i, j int) bool

func (*Entries) Pop

func (eh *Entries) Pop() interface{}

func (*Entries) Push

func (eh *Entries) Push(x interface{})

func (Entries) Swap

func (eh Entries) Swap(i, j int)

type Entry

type Entry struct {
	Id         int64             `json:"id"`
	Time       string            `json:"time"`
	Term       int               `json:"term"`
	Operate    string            `json:"operate"`
	Preference string            `json:"preference"`
	Cmd        string            `json:"cmd"`
	Value      map[string]string `json:"value"`
}

func (Entry) ToString

func (e Entry) ToString() string

type HeartBeatRetVal

type HeartBeatRetVal struct {
	State string
	Begin int64
	End   int64
}

type KV

type KV map[string]string

type RetValue

type RetValue struct {
	Code int
	Msg  string
	Data interface{}
}

type TopologyData

type TopologyData struct {
	Leader  string   `json:"leader"`
	Cluster []string `json:"cluster"`
}

Jump to

Keyboard shortcuts

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