types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidVersion = Version(0)
	MinVersion     = Version(1)
	MaxVersion     = Version(math.MaxUint64)
)
View Source
const (
	InvalidGLSN = GLSN(0)
	MinGLSN     = GLSN(1)
	MaxGLSN     = GLSN(math.MaxUint64)
)
View Source
const (
	InvalidLLSN = LLSN(0)
	MinLLSN     = LLSN(1)
	MaxLLSN     = LLSN(math.MaxUint64)
)
View Source
const (
	InvalidNodeID = NodeID(0)
	MinNodeID     = NodeID(1)
	MaxNodeID     = NodeID(math.MaxUint64)
)
View Source
const MaxLogStreamID = LogStreamID(math.MaxInt32)
View Source
const MinLogStreamID = LogStreamID(1)
View Source
const MinStorageNodeID = StorageNodeID(1)
View Source
const MinTopicID = TopicID(1)

Variables

Functions

This section is empty.

Types

type AtomicGLSN

type AtomicGLSN uint64

func (*AtomicGLSN) Add

func (glsn *AtomicGLSN) Add(delta uint64) GLSN

func (*AtomicGLSN) CompareAndSwap

func (glsn *AtomicGLSN) CompareAndSwap(old, new GLSN) (swapped bool)

func (*AtomicGLSN) Load

func (glsn *AtomicGLSN) Load() GLSN

func (*AtomicGLSN) Store

func (glsn *AtomicGLSN) Store(val GLSN)

type AtomicLLSN

type AtomicLLSN uint64

func (*AtomicLLSN) Add

func (llsn *AtomicLLSN) Add(delta uint64) LLSN

func (*AtomicLLSN) CompareAndSwap

func (llsn *AtomicLLSN) CompareAndSwap(old, new LLSN) (swapped bool)

func (*AtomicLLSN) Load

func (llsn *AtomicLLSN) Load() LLSN

func (*AtomicLLSN) Store

func (llsn *AtomicLLSN) Store(val LLSN)

type AtomicVersion

type AtomicVersion uint64

func (*AtomicVersion) Add

func (ver *AtomicVersion) Add(delta uint64) Version

func (*AtomicVersion) CompareAndSwap

func (ver *AtomicVersion) CompareAndSwap(old, new Version) (swapped bool)

func (*AtomicVersion) Load

func (ver *AtomicVersion) Load() Version

func (*AtomicVersion) Store

func (ver *AtomicVersion) Store(val Version)

type ClusterID

type ClusterID uint32

func NewClusterIDFromUint

func NewClusterIDFromUint(u uint) (ClusterID, error)

func ParseClusterID

func ParseClusterID(s string) (ClusterID, error)

func (ClusterID) String

func (cid ClusterID) String() string

type GLSN

type GLSN uint64

func (GLSN) Invalid

func (glsn GLSN) Invalid() bool

type LLSN

type LLSN uint64

func (LLSN) Invalid

func (llsn LLSN) Invalid() bool

type LogStreamID

type LogStreamID int32

func ParseLogStreamID

func ParseLogStreamID(s string) (LogStreamID, error)

func (LogStreamID) Invalid

func (lsid LogStreamID) Invalid() bool

func (LogStreamID) String

func (lsid LogStreamID) String() string

type NodeID

type NodeID uint64

func NewNodeID

func NewNodeID(addr string) NodeID

convert string(ip:port) to uint64 TODO:: LookupHost

func NewNodeIDFromURL

func NewNodeIDFromURL(rawurl string) NodeID

func (NodeID) Reverse

func (nid NodeID) Reverse() string

func (NodeID) String

func (nid NodeID) String() string

type StorageNodeID

type StorageNodeID int32

func ParseStorageNodeID

func ParseStorageNodeID(s string) (StorageNodeID, error)

func (StorageNodeID) Invalid

func (snid StorageNodeID) Invalid() bool

func (StorageNodeID) String

func (snid StorageNodeID) String() string

type TopicID

type TopicID int32

func ParseTopicID

func ParseTopicID(s string) (TopicID, error)

func (TopicID) Invalid

func (tpid TopicID) Invalid() bool

func (TopicID) String

func (tpid TopicID) String() string

type Version

type Version uint64

func (Version) Invalid

func (ver Version) Invalid() bool

Jump to

Keyboard shortcuts

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