Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMAllocator ¶
Types ¶
type Allocator ¶
type Allocator interface {
// Allocate allocates a timestamp.
Allocate(ctx context.Context) (uint64, error)
// Sync expire the local allocator messages,
// syncs the local allocator and remote allocator.
Sync()
}
func NewIDAllocator ¶
func NewIDAllocator(rc types.RootCoordClient) Allocator
NewIDAllocator creates a new allocator.
func NewTSOAllocator ¶
func NewTSOAllocator(rc types.RootCoordClient) Allocator
NewTSOAllocator creates a new allocator.
Click to show internal directories.
Click to hide internal directories.