clock

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type HybridLogicalClock added in v1.21.0

type HybridLogicalClock struct {
	// Wall clock - A single time source MUST guarantee that 2 consecutive timestamps are monotonically non-decreasing.
	// e.g. by storing the last wall clock and returning max(gettimeofday(), lastWallClock).
	WallClock int64 `protobuf:"varint,1,opt,name=wall_clock,json=wallClock,proto3" json:"wall_clock,omitempty"`
	// Incremental sequence that is reset every time the system's wallclock moves forward.
	// Ensures the clock generates monotonically increasing timestamps.
	Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// The cluster version ID as described in the XDC docs - used as a tie breaker.
	// See: https://github.com/uber/cadence/blob/master/docs/design/2290-cadence-ndc.md
	ClusterId int64 `protobuf:"varint,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
}

A Hybrid Logical Clock timestamp. Guarantees strict total ordering for conflict resolution purposes.

func (*HybridLogicalClock) Descriptor added in v1.21.0

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

func (*HybridLogicalClock) Equal added in v1.21.0

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

func (*HybridLogicalClock) GetClusterId added in v1.21.0

func (m *HybridLogicalClock) GetClusterId() int64

func (*HybridLogicalClock) GetVersion added in v1.21.0

func (m *HybridLogicalClock) GetVersion() int32

func (*HybridLogicalClock) GetWallClock added in v1.21.0

func (m *HybridLogicalClock) GetWallClock() int64

func (*HybridLogicalClock) GoString added in v1.21.0

func (this *HybridLogicalClock) GoString() string

func (*HybridLogicalClock) Marshal added in v1.21.0

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

func (*HybridLogicalClock) MarshalTo added in v1.21.0

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

func (*HybridLogicalClock) MarshalToSizedBuffer added in v1.21.0

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

func (*HybridLogicalClock) ProtoMessage added in v1.21.0

func (*HybridLogicalClock) ProtoMessage()

func (*HybridLogicalClock) Reset added in v1.21.0

func (m *HybridLogicalClock) Reset()

func (*HybridLogicalClock) Size added in v1.21.0

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

func (*HybridLogicalClock) String added in v1.21.0

func (this *HybridLogicalClock) String() string

func (*HybridLogicalClock) Unmarshal added in v1.21.0

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

func (*HybridLogicalClock) XXX_DiscardUnknown added in v1.21.0

func (m *HybridLogicalClock) XXX_DiscardUnknown()

func (*HybridLogicalClock) XXX_Marshal added in v1.21.0

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

func (*HybridLogicalClock) XXX_Merge added in v1.21.0

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

func (*HybridLogicalClock) XXX_Size added in v1.21.0

func (m *HybridLogicalClock) XXX_Size() int

func (*HybridLogicalClock) XXX_Unmarshal added in v1.21.0

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

type VectorClock

type VectorClock struct {
	ShardId   int32 `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
	Clock     int64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
	ClusterId int64 `protobuf:"varint,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
}

func (*VectorClock) Descriptor

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

func (*VectorClock) Equal

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

func (*VectorClock) GetClock

func (m *VectorClock) GetClock() int64

func (*VectorClock) GetClusterId

func (m *VectorClock) GetClusterId() int64

func (*VectorClock) GetShardId

func (m *VectorClock) GetShardId() int32

func (*VectorClock) GoString

func (this *VectorClock) GoString() string

func (*VectorClock) Marshal

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

func (*VectorClock) MarshalTo

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

func (*VectorClock) MarshalToSizedBuffer

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

func (*VectorClock) ProtoMessage

func (*VectorClock) ProtoMessage()

func (*VectorClock) Reset

func (m *VectorClock) Reset()

func (*VectorClock) Size

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

func (*VectorClock) String

func (this *VectorClock) String() string

func (*VectorClock) Unmarshal

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

func (*VectorClock) XXX_DiscardUnknown

func (m *VectorClock) XXX_DiscardUnknown()

func (*VectorClock) XXX_Marshal

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

func (*VectorClock) XXX_Merge

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

func (*VectorClock) XXX_Size

func (m *VectorClock) XXX_Size() int

func (*VectorClock) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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