package
0.0.0-20241223090118-035fcd7fed56
Repository: https://github.com/ibiscum/hands-on-software-engineering-with-golang.git
Documentation: pkg.go.dev

# Functions

DetectFromSRVRecords returns a PartitionDetector implementation that extracts the current partition name from the current host name and attempts to detect the total number of partitions by performing an SRV query and counting the number of responses.
NewFullRange creates a new range that uses the full UUID value space and splits it into the provided number of partitions.
NewRange creates a new range [start, end) and splits it into the provided number of partitions.

# Variables

ErrNoPartitionDataAvailableYet is returned by the SRV-aware partition detector to indicate that SRV records for this target application are not yet available.

# Structs

Fixed is a dummy PartitionDetector implementation that always returns back the same partition details.
FromSRVRecords detects the number of partitions by performing an SRV query and counting the number of results.
Range represents a contiguous UUID region which is split into a number of partitions.

# Interfaces

Detector is implemented by types that can assign a clustered application instance to a particular partition.