mytest

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupJoined = iota
	GroupServing
	GroupLeaving
	GroupRemoving
	GroupRemoved
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseArgs

type BaseArgs struct {
	Cid int64
	Seq int64
}

func (*BaseArgs) DecodeMsg

func (z *BaseArgs) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (BaseArgs) EncodeMsg

func (z BaseArgs) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (BaseArgs) MarshalMsg

func (z BaseArgs) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (BaseArgs) Msgsize

func (z BaseArgs) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BaseArgs) UnmarshalMsg

func (z *BaseArgs) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GroupInfo

type GroupInfo struct {
	Id       int
	ConfNum  int
	IsLeader bool
	Status   GroupStatus
	Shards   map[int]ShardInfo
	Size     int64
	Peer     int
}

func (*GroupInfo) DecodeMsg

func (z *GroupInfo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*GroupInfo) EncodeMsg

func (z *GroupInfo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*GroupInfo) MarshalMsg

func (z *GroupInfo) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GroupInfo) Msgsize

func (z *GroupInfo) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GroupInfo) UnmarshalMsg

func (z *GroupInfo) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GroupStatus

type GroupStatus int

func (*GroupStatus) DecodeMsg

func (z *GroupStatus) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (GroupStatus) EncodeMsg

func (z GroupStatus) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (GroupStatus) MarshalMsg

func (z GroupStatus) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (GroupStatus) Msgsize

func (z GroupStatus) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GroupStatus) UnmarshalMsg

func (z *GroupStatus) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type HeartbeatArgs

type HeartbeatArgs struct {
	BaseArgs
	NodeId int
	Addr   string
	Groups map[int]*GroupInfo
}

func (*HeartbeatArgs) DecodeMsg

func (z *HeartbeatArgs) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*HeartbeatArgs) EncodeMsg

func (z *HeartbeatArgs) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*HeartbeatArgs) MarshalMsg

func (z *HeartbeatArgs) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*HeartbeatArgs) Msgsize

func (z *HeartbeatArgs) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*HeartbeatArgs) UnmarshalMsg

func (z *HeartbeatArgs) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ShardInfo

type ShardInfo struct {
	Id         int
	Gid        int
	Status     ShardStatus
	Size       int64
	Capacity   uint64
	RangeStart string
	RangeEnd   string
}

func (*ShardInfo) DecodeMsg

func (z *ShardInfo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*ShardInfo) EncodeMsg

func (z *ShardInfo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*ShardInfo) MarshalMsg

func (z *ShardInfo) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ShardInfo) Msgsize

func (z *ShardInfo) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ShardInfo) UnmarshalMsg

func (z *ShardInfo) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ShardStatus

type ShardStatus int
const (
	SERVING ShardStatus = iota
	INVALID
	PULLING
	ERASING
	WAITING
)

func (*ShardStatus) DecodeMsg

func (z *ShardStatus) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ShardStatus) EncodeMsg

func (z ShardStatus) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ShardStatus) MarshalMsg

func (z ShardStatus) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ShardStatus) Msgsize

func (z ShardStatus) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ShardStatus) UnmarshalMsg

func (z *ShardStatus) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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