commandpb

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCommand        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommand          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommand = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Command

type Command struct {
	Timestamp   uint64                                                 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Ops         []Operation                                            `protobuf:"bytes,2,rep,name=ops,proto3" json:"ops"`
	Target      github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 150-byte string literal not displayed */
	Meta        []byte                                                 `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"`
	ConflictKey []byte                                                 `protobuf:"bytes,5,opt,name=conflict_key,json=conflictKey,proto3" json:"conflict_key,omitempty"`
	TraceInfo   map[string]string                                      `` /* 176-byte string literal not displayed */
}

func (*Command) Descriptor

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

func (*Command) Equal

func (m *Command) Equal(o *Command) bool

func (*Command) GetConflictKey

func (m *Command) GetConflictKey() []byte

func (*Command) GetMeta

func (m *Command) GetMeta() []byte

func (*Command) GetOps

func (m *Command) GetOps() []Operation

func (*Command) GetTimestamp

func (m *Command) GetTimestamp() uint64

func (*Command) GetTraceInfo

func (m *Command) GetTraceInfo() map[string]string

func (*Command) Hash

func (m *Command) Hash() []byte

Hash returns the hash of the command.

func (*Command) Interferes

func (m *Command) Interferes(o Command) bool

Interferes returns whether the two Commands interfere.

func (*Command) Marshal

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

func (*Command) MarshalTo

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

func (*Command) MarshalToSizedBuffer

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

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) Size

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

func (*Command) String

func (m *Command) String() string

func (*Command) Unmarshal

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

func (*Command) XXX_DiscardUnknown

func (m *Command) XXX_DiscardUnknown()

func (*Command) XXX_Marshal

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

func (*Command) XXX_Merge

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

func (*Command) XXX_Size

func (m *Command) XXX_Size() int

func (*Command) XXX_Unmarshal

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

type CommandResult

type CommandResult struct {
	Timestamp uint64                                                 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	OpResults []OperationResult                                      `protobuf:"bytes,2,rep,name=op_results,json=opResults,proto3" json:"op_results"`
	Target    github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 150-byte string literal not displayed */
	Meta      []byte                                                 `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"`
}

func (*CommandResult) Descriptor

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

func (*CommandResult) Equal

func (m *CommandResult) Equal(o *CommandResult) bool

func (*CommandResult) GetMeta

func (m *CommandResult) GetMeta() []byte

func (*CommandResult) GetOpResults

func (m *CommandResult) GetOpResults() []OperationResult

func (*CommandResult) GetTimestamp

func (m *CommandResult) GetTimestamp() uint64

func (*CommandResult) Marshal

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

func (*CommandResult) MarshalTo

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

func (*CommandResult) MarshalToSizedBuffer

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

func (*CommandResult) ProtoMessage

func (*CommandResult) ProtoMessage()

func (*CommandResult) Reset

func (m *CommandResult) Reset()

func (*CommandResult) Size

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

func (*CommandResult) String

func (m *CommandResult) String() string

func (*CommandResult) Unmarshal

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

func (*CommandResult) XXX_DiscardUnknown

func (m *CommandResult) XXX_DiscardUnknown()

func (*CommandResult) XXX_Marshal

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

func (*CommandResult) XXX_Merge

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

func (*CommandResult) XXX_Size

func (m *CommandResult) XXX_Size() int

func (*CommandResult) XXX_Unmarshal

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

type KVOp

type KVOp struct {
	Key   Key    `protobuf:"bytes,1,opt,name=key,proto3,casttype=Key" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Read  bool   `protobuf:"varint,3,opt,name=read,proto3" json:"read,omitempty"`
}

func (*KVOp) Descriptor

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

func (*KVOp) Equal

func (k *KVOp) Equal(o *KVOp) bool

Equal returns whether two Operation are identical.

func (*KVOp) GetKey

func (m *KVOp) GetKey() Key

func (*KVOp) GetRead

func (m *KVOp) GetRead() bool

func (*KVOp) GetValue

func (m *KVOp) GetValue() []byte

func (*KVOp) Marshal

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

func (*KVOp) MarshalTo

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

func (*KVOp) MarshalToSizedBuffer

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

func (*KVOp) ProtoMessage

func (*KVOp) ProtoMessage()

func (*KVOp) Reset

func (m *KVOp) Reset()

func (*KVOp) Size

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

func (*KVOp) String

func (m *KVOp) String() string

func (*KVOp) Unmarshal

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

func (*KVOp) XXX_DiscardUnknown

func (m *KVOp) XXX_DiscardUnknown()

func (*KVOp) XXX_Marshal

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

func (*KVOp) XXX_Merge

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

func (*KVOp) XXX_Size

func (m *KVOp) XXX_Size() int

func (*KVOp) XXX_Unmarshal

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

type KVOpResult

type KVOpResult struct {
	Key          Key    `protobuf:"bytes,1,opt,name=key,proto3,casttype=Key" json:"key,omitempty"`
	Value        []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	WriteSuccess bool   `protobuf:"varint,3,opt,name=write_success,json=writeSuccess,proto3" json:"write_success,omitempty"`
}

func (*KVOpResult) Descriptor

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

func (*KVOpResult) Equal

func (k *KVOpResult) Equal(o *KVOpResult) bool

Equal returns whether two Operation are identical.

func (*KVOpResult) GetKey

func (m *KVOpResult) GetKey() Key

func (*KVOpResult) GetValue

func (m *KVOpResult) GetValue() []byte

func (*KVOpResult) GetWriteSuccess

func (m *KVOpResult) GetWriteSuccess() bool

func (*KVOpResult) Marshal

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

func (*KVOpResult) MarshalTo

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

func (*KVOpResult) MarshalToSizedBuffer

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

func (*KVOpResult) ProtoMessage

func (*KVOpResult) ProtoMessage()

func (*KVOpResult) Reset

func (m *KVOpResult) Reset()

func (*KVOpResult) Size

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

func (*KVOpResult) String

func (m *KVOpResult) String() string

func (*KVOpResult) Unmarshal

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

func (*KVOpResult) XXX_DiscardUnknown

func (m *KVOpResult) XXX_DiscardUnknown()

func (*KVOpResult) XXX_Marshal

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

func (*KVOpResult) XXX_Merge

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

func (*KVOpResult) XXX_Size

func (m *KVOpResult) XXX_Size() int

func (*KVOpResult) XXX_Unmarshal

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

type Key

type Key []byte

func (Key) Compare

func (k Key) Compare(k2 Key) int

Compare compares the two Keys. The result will be 0 if k == k2, -1 if k < k2, and +1 if k > k2.

func (Key) Equal

func (k Key) Equal(o Key) bool

Equal returns whether two Keys are identical.

func (Key) String

func (k Key) String() string

type Operation

type Operation struct {
	// Types that are valid to be assigned to Type:
	//	*Operation_KVOp
	Type isOperation_Type `protobuf_oneof:"type"`
}

func (*Operation) Descriptor

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

func (*Operation) Equal

func (k *Operation) Equal(o *Operation) bool

Equal returns whether two Operation are identical.

func (*Operation) GetKVOp

func (m *Operation) GetKVOp() *KVOp

func (*Operation) GetType

func (m *Operation) GetType() isOperation_Type

func (*Operation) Marshal

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

func (*Operation) MarshalTo

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

func (*Operation) MarshalToSizedBuffer

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

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) Size

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

func (*Operation) String

func (m *Operation) String() string

func (*Operation) Unmarshal

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

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

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

func (*Operation) XXX_Merge

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

func (*Operation) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

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

type OperationResult

type OperationResult struct {
	// Types that are valid to be assigned to Type:
	//	*OperationResult_KVOpResult
	Type isOperationResult_Type `protobuf_oneof:"type"`
}

func (*OperationResult) Descriptor

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

func (*OperationResult) Equal

func (k *OperationResult) Equal(o *OperationResult) bool

Equal returns whether two OperationResult are identical.

func (*OperationResult) GetKVOpResult

func (m *OperationResult) GetKVOpResult() *KVOpResult

func (*OperationResult) GetType

func (m *OperationResult) GetType() isOperationResult_Type

func (*OperationResult) Marshal

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

func (*OperationResult) MarshalTo

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

func (*OperationResult) MarshalToSizedBuffer

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

func (*OperationResult) ProtoMessage

func (*OperationResult) ProtoMessage()

func (*OperationResult) Reset

func (m *OperationResult) Reset()

func (*OperationResult) Size

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

func (*OperationResult) String

func (m *OperationResult) String() string

func (*OperationResult) Unmarshal

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

func (*OperationResult) XXX_DiscardUnknown

func (m *OperationResult) XXX_DiscardUnknown()

func (*OperationResult) XXX_Marshal

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

func (*OperationResult) XXX_Merge

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

func (*OperationResult) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*OperationResult) XXX_Size

func (m *OperationResult) XXX_Size() int

func (*OperationResult) XXX_Unmarshal

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

type OperationResult_KVOpResult

type OperationResult_KVOpResult struct {
	KVOpResult *KVOpResult `protobuf:"bytes,1,opt,name=KVOpResult,proto3,oneof" json:"KVOpResult,omitempty"`
}

func (*OperationResult_KVOpResult) MarshalTo

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

func (*OperationResult_KVOpResult) MarshalToSizedBuffer

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

func (*OperationResult_KVOpResult) Size

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

type OperationResults

type OperationResults []OperationResult

func (OperationResults) Equal

Equal returns whether two OperationResult are identical.

type Operation_KVOp

type Operation_KVOp struct {
	KVOp *KVOp `protobuf:"bytes,1,opt,name=KVOp,proto3,oneof" json:"KVOp,omitempty"`
}

func (*Operation_KVOp) MarshalTo

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

func (*Operation_KVOp) MarshalToSizedBuffer

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

func (*Operation_KVOp) Size

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

Jump to

Keyboard shortcuts

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