Documentation
¶
Index ¶
- func BytesToUint64(b []byte) uint64
- func GetGID() uint64
- func IsSyncMapEmpty(m *sync.Map) bool
- func LenSyncMap(m *sync.Map) int
- func NewConnectionCache(cip ClusterInfoProvider) *connCache
- func NowUnixUtc() uint64
- func OutboundIP() net.IP
- func RandomRaftId() uint64
- func TrackTime(logger *log.Entry, name string, start time.Time)
- func Uint64ToBytes(u uint64) []byte
- func Uint64ToBytesInto(u uint64, buf []byte) error
- func Uint64ToString(i uint64) string
- type ClusterInfoProvider
- type ConnectionCache
- type DataStoreTxn
- type DataStoreTxnProvider
- type PartitionedDataStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUint64 ¶
converts bytes to an unsinged 64 bit integer
func IsSyncMapEmpty ¶
func LenSyncMap ¶
func NewConnectionCache ¶
func NewConnectionCache(cip ClusterInfoProvider) *connCache
func NowUnixUtc ¶
func NowUnixUtc() uint64
func RandomRaftId ¶
func RandomRaftId() uint64
func Uint64ToBytesInto ¶
func Uint64ToString ¶
Types ¶
type ClusterInfoProvider ¶
type ClusterInfoProvider interface { FindOwnerForKey(key []byte) uint64 FindPartitionForKey(key []byte) int IsLocal(key []byte) bool AmIWriter(writerNodes []uint64) bool GetAddressFor(nodeID uint64) string MyPartitions() []int FindOwnerForPartition(partitionID int) uint64 }
func NewClusterInfoProvider ¶
func NewClusterInfoProvider(ownNodeID uint64, pathToClusterInfo string) ClusterInfoProvider
type ConnectionCache ¶
type ConnectionCache interface { GetLowIsolationReadClient(nodeID uint64) (pb.LowIsolationReadClient, error) GetRemoteReadClient(nodeID uint64) (pb.RemoteReadClient, error) GetRaftTransportClient(nodeID uint64) (pb.RaftTransportClient, error) Close() }
type DataStoreTxn ¶
type DataStoreTxnProvider ¶
type PartitionedDataStore ¶
type PartitionedDataStore interface { CreatePartition(partitionID int) (DataStoreTxnProvider, error) GetPartition(partitionID int) (DataStoreTxnProvider, error) Snapshot(w io.Writer) error Close() }
Click to show internal directories.
Click to hide internal directories.