duobftpb

package
v0.0.0-...-3a733ff Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDuobft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDuobft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDuobft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var InstanceState_Status_name = map[int32]string{
	0: "None",
	1: "Prepared",
	2: "PreCommitted",
	3: "Committed",
	4: "Executed",
}
View Source
var InstanceState_Status_value = map[string]int32{
	"None":         0,
	"Prepared":     1,
	"PreCommitted": 2,
	"Committed":    3,
	"Executed":     4,
}
View Source
var InstanceState_TStatus_name = map[int32]string{
	0: "TNone",
	1: "TPrepared",
	3: "TCommitted",
	4: "TExecuted",
}
View Source
var InstanceState_TStatus_value = map[string]int32{
	"TNone":      0,
	"TPrepared":  1,
	"TCommitted": 3,
	"TExecuted":  4,
}
View Source
var NormalMessage_Type_name = map[int32]string{
	0: "Prepare",
	1: "PreCommit",
	2: "Commit",
}
View Source
var NormalMessage_Type_value = map[string]int32{
	"Prepare":   0,
	"PreCommit": 1,
	"Commit":    2,
}

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isDuoBFTMessage_Type

WrapMessageInner wraps a union type of Message in a new isMessage_Type.

Types

type DuoBFTMessage

type DuoBFTMessage struct {
	// Types that are valid to be assigned to Type:
	//	*DuoBFTMessage_Normal
	Type isDuoBFTMessage_Type `protobuf_oneof:"type"`
}

func WrapduobftMessage

func WrapduobftMessage(msg proto.Message) *DuoBFTMessage

WrapduobftMessage wraps a union type of Message in a new PBFTMessage without a destination.

func (*DuoBFTMessage) Descriptor

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

func (*DuoBFTMessage) GetNormal

func (m *DuoBFTMessage) GetNormal() *NormalMessage

func (*DuoBFTMessage) GetType

func (m *DuoBFTMessage) GetType() isDuoBFTMessage_Type

func (*DuoBFTMessage) Marshal

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

func (*DuoBFTMessage) MarshalTo

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

func (*DuoBFTMessage) MarshalToSizedBuffer

func (m *DuoBFTMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DuoBFTMessage) ProtoMessage

func (*DuoBFTMessage) ProtoMessage()

func (*DuoBFTMessage) Reset

func (m *DuoBFTMessage) Reset()

func (*DuoBFTMessage) Size

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

func (*DuoBFTMessage) String

func (m *DuoBFTMessage) String() string

func (*DuoBFTMessage) Unmarshal

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

func (*DuoBFTMessage) XXX_DiscardUnknown

func (m *DuoBFTMessage) XXX_DiscardUnknown()

func (*DuoBFTMessage) XXX_Marshal

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

func (*DuoBFTMessage) XXX_Merge

func (m *DuoBFTMessage) XXX_Merge(src proto.Message)

func (*DuoBFTMessage) XXX_OneofWrappers

func (*DuoBFTMessage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*DuoBFTMessage) XXX_Size

func (m *DuoBFTMessage) XXX_Size() int

func (*DuoBFTMessage) XXX_Unmarshal

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

type DuoBFTMessage_Normal

type DuoBFTMessage_Normal struct {
	Normal *NormalMessage `protobuf:"bytes,1,opt,name=normal,proto3,oneof" json:"normal,omitempty"`
}

func (*DuoBFTMessage_Normal) MarshalTo

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

func (*DuoBFTMessage_Normal) MarshalToSizedBuffer

func (m *DuoBFTMessage_Normal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DuoBFTMessage_Normal) Size

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

type Index

type Index uint64

Index is the number of an instance slot in a replica's command array.

type InstanceState

type InstanceState struct {
	View        View                  `protobuf:"varint,1,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	Index       Index                 `protobuf:"varint,2,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	Status      InstanceState_Status  `protobuf:"varint,3,opt,name=status,proto3,enum=duobftpb.InstanceState_Status" json:"status,omitempty"`
	TStatus     InstanceState_TStatus `protobuf:"varint,4,opt,name=t_status,json=tStatus,proto3,enum=duobftpb.InstanceState_TStatus" json:"t_status,omitempty"`
	Command     *commandpb.Command    `protobuf:"bytes,5,opt,name=command,proto3" json:"command,omitempty"`
	CommandHash []byte                `protobuf:"bytes,6,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
}

func (*InstanceState) Descriptor

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

func (*InstanceState) GetCommand

func (m *InstanceState) GetCommand() *commandpb.Command

func (*InstanceState) GetCommandHash

func (m *InstanceState) GetCommandHash() []byte

func (*InstanceState) GetIndex

func (m *InstanceState) GetIndex() Index

func (*InstanceState) GetStatus

func (m *InstanceState) GetStatus() InstanceState_Status

func (*InstanceState) GetTStatus

func (m *InstanceState) GetTStatus() InstanceState_TStatus

func (*InstanceState) GetView

func (m *InstanceState) GetView() View

func (*InstanceState) IsCommitted

func (m *InstanceState) IsCommitted() bool

func (*InstanceState) IsPreCommitted

func (m *InstanceState) IsPreCommitted() bool

func (*InstanceState) IsPrepared

func (m *InstanceState) IsPrepared() bool

func (*InstanceState) IsTCommitted

func (m *InstanceState) IsTCommitted() bool

func (*InstanceState) IsTPrepared

func (m *InstanceState) IsTPrepared() bool

func (*InstanceState) Marshal

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

func (*InstanceState) MarshalTo

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

func (*InstanceState) MarshalToSizedBuffer

func (m *InstanceState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InstanceState) ProtoMessage

func (*InstanceState) ProtoMessage()

func (*InstanceState) Reset

func (m *InstanceState) Reset()

func (*InstanceState) Size

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

func (*InstanceState) String

func (m *InstanceState) String() string

func (*InstanceState) Unmarshal

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

func (*InstanceState) XXX_DiscardUnknown

func (m *InstanceState) XXX_DiscardUnknown()

func (*InstanceState) XXX_Marshal

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

func (*InstanceState) XXX_Merge

func (m *InstanceState) XXX_Merge(src proto.Message)

func (*InstanceState) XXX_Size

func (m *InstanceState) XXX_Size() int

func (*InstanceState) XXX_Unmarshal

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

type InstanceState_Status

type InstanceState_Status int32
const (
	InstanceState_None         InstanceState_Status = 0
	InstanceState_Prepared     InstanceState_Status = 1
	InstanceState_PreCommitted InstanceState_Status = 2
	InstanceState_Committed    InstanceState_Status = 3
	InstanceState_Executed     InstanceState_Status = 4
)

func (InstanceState_Status) EnumDescriptor

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

func (InstanceState_Status) String

func (x InstanceState_Status) String() string

type InstanceState_TStatus

type InstanceState_TStatus int32
const (
	InstanceState_TNone      InstanceState_TStatus = 0
	InstanceState_TPrepared  InstanceState_TStatus = 1
	InstanceState_TCommitted InstanceState_TStatus = 3
	InstanceState_TExecuted  InstanceState_TStatus = 4
)

func (InstanceState_TStatus) EnumDescriptor

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

func (InstanceState_TStatus) String

func (x InstanceState_TStatus) String() string

type NormalMessage

type NormalMessage struct {
	Type        NormalMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=duobftpb.NormalMessage_Type" json:"type,omitempty"`
	View        View               `protobuf:"varint,2,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	Index       Index              `protobuf:"varint,3,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
	Command     *commandpb.Command `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	CommandHash []byte             `protobuf:"bytes,5,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
}

func (*NormalMessage) Descriptor

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

func (*NormalMessage) Equals

func (m *NormalMessage) Equals(other *NormalMessage) bool

func (*NormalMessage) GetCommand

func (m *NormalMessage) GetCommand() *commandpb.Command

func (*NormalMessage) GetCommandHash

func (m *NormalMessage) GetCommandHash() []byte

func (*NormalMessage) GetIndex

func (m *NormalMessage) GetIndex() Index

func (*NormalMessage) GetType

func (m *NormalMessage) GetType() NormalMessage_Type

func (*NormalMessage) GetView

func (m *NormalMessage) GetView() View

func (*NormalMessage) Marshal

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

func (*NormalMessage) MarshalTo

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

func (*NormalMessage) MarshalToSizedBuffer

func (m *NormalMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NormalMessage) ProtoMessage

func (*NormalMessage) ProtoMessage()

func (*NormalMessage) Reset

func (m *NormalMessage) Reset()

func (*NormalMessage) Size

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

func (*NormalMessage) String

func (m *NormalMessage) String() string

func (*NormalMessage) Unmarshal

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

func (*NormalMessage) XXX_DiscardUnknown

func (m *NormalMessage) XXX_DiscardUnknown()

func (*NormalMessage) XXX_Marshal

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

func (*NormalMessage) XXX_Merge

func (m *NormalMessage) XXX_Merge(src proto.Message)

func (*NormalMessage) XXX_Size

func (m *NormalMessage) XXX_Size() int

func (*NormalMessage) XXX_Unmarshal

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

type NormalMessage_Type

type NormalMessage_Type int32
const (
	NormalMessage_Prepare   NormalMessage_Type = 0
	NormalMessage_PreCommit NormalMessage_Type = 1
	NormalMessage_Commit    NormalMessage_Type = 2
)

func (NormalMessage_Type) EnumDescriptor

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

func (NormalMessage_Type) String

func (x NormalMessage_Type) String() string

type View

type View uint64

View is a view

Jump to

Keyboard shortcuts

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