raftpb

package
v0.0.0-...-7b3ddb2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRaftcmd = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRaftcmd   = fmt.Errorf("proto: integer overflow")
)
View Source
var CmdType_name = map[int32]string{
	0: "WRITE",
	1: "UPDATESPACE",
	2: "FLUSH",
}
View Source
var CmdType_value = map[string]int32{
	"WRITE":       0,
	"UPDATESPACE": 1,
	"FLUSH":       2,
}

Functions

This section is empty.

Types

type CmdType

type CmdType int32
const (
	CmdType_WRITE       CmdType = 0
	CmdType_UPDATESPACE CmdType = 1
	CmdType_FLUSH       CmdType = 2
)

func (CmdType) EnumDescriptor

func (CmdType) EnumDescriptor() ([]byte, []int)

func (CmdType) String

func (x CmdType) String() string

type RaftCommand

type RaftCommand struct {
	Type                 CmdType           `protobuf:"varint,1,opt,name=type,proto3,enum=raftpb.CmdType" json:"type,omitempty"`
	WriteCommand         *pspb.DocCmd      `protobuf:"bytes,2,opt,name=write_command,json=writeCommand,proto3" json:"write_command,omitempty"`
	UpdateSpace          *pspb.UpdateSpace `protobuf:"bytes,3,opt,name=update_space,json=updateSpace,proto3" json:"update_space,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func CreateRaftCommand

func CreateRaftCommand() *RaftCommand

CreateRaftCommand create a RaftCommand object

func NewPopulatedRaftCommand

func NewPopulatedRaftCommand(r randyRaftcmd, easy bool) *RaftCommand

func (*RaftCommand) Close

func (c *RaftCommand) Close() error

Close reset and put to pool

func (*RaftCommand) Descriptor

func (*RaftCommand) Descriptor() ([]byte, []int)

func (*RaftCommand) Equal

func (this *RaftCommand) Equal(that interface{}) bool

func (*RaftCommand) Marshal

func (m *RaftCommand) Marshal() (dAtA []byte, err error)

func (*RaftCommand) MarshalTo

func (m *RaftCommand) MarshalTo(dAtA []byte) (int, error)

func (*RaftCommand) ProtoMessage

func (*RaftCommand) ProtoMessage()

func (*RaftCommand) Reset

func (m *RaftCommand) Reset()

func (*RaftCommand) Size

func (m *RaftCommand) Size() (n int)

func (*RaftCommand) String

func (this *RaftCommand) String() string

func (*RaftCommand) Unmarshal

func (m *RaftCommand) Unmarshal(dAtA []byte) error

func (*RaftCommand) XXX_DiscardUnknown

func (m *RaftCommand) XXX_DiscardUnknown()

func (*RaftCommand) XXX_Marshal

func (m *RaftCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RaftCommand) XXX_Merge

func (dst *RaftCommand) XXX_Merge(src proto.Message)

func (*RaftCommand) XXX_Size

func (m *RaftCommand) XXX_Size() int

func (*RaftCommand) XXX_Unmarshal

func (m *RaftCommand) XXX_Unmarshal(b []byte) error

type SnapData

type SnapData struct {
	Key                  []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedSnapData

func NewPopulatedSnapData(r randyRaftcmd, easy bool) *SnapData

func (*SnapData) Descriptor

func (*SnapData) Descriptor() ([]byte, []int)

func (*SnapData) Equal

func (this *SnapData) Equal(that interface{}) bool

func (*SnapData) Marshal

func (m *SnapData) Marshal() (dAtA []byte, err error)

func (*SnapData) MarshalTo

func (m *SnapData) MarshalTo(dAtA []byte) (int, error)

func (*SnapData) ProtoMessage

func (*SnapData) ProtoMessage()

func (*SnapData) Reset

func (m *SnapData) Reset()

func (*SnapData) Size

func (m *SnapData) Size() (n int)

func (*SnapData) String

func (this *SnapData) String() string

func (*SnapData) Unmarshal

func (m *SnapData) Unmarshal(dAtA []byte) error

func (*SnapData) XXX_DiscardUnknown

func (m *SnapData) XXX_DiscardUnknown()

func (*SnapData) XXX_Marshal

func (m *SnapData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapData) XXX_Merge

func (dst *SnapData) XXX_Merge(src proto.Message)

func (*SnapData) XXX_Size

func (m *SnapData) XXX_Size() int

func (*SnapData) XXX_Unmarshal

func (m *SnapData) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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