Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidNodeHostID indicates that the NodeHost ID value provided is // invalid ErrInvalidNodeHostID = errors.New("invalid NodeHost ID value") )
Functions ¶
func IsNodeHostID ¶
IsNodeHostID returns a boolean value indicating whether the specified value is a valid string representation of NodeHostID.
Types ¶
type NodeHostID ¶
type NodeHostID struct {
// contains filtered or unexported fields
}
NodeHostID is the NodeHost ID type used for identifying a NodeHost instance.
func NewNodeHostID ¶
func NewNodeHostID(id uint64) (*NodeHostID, error)
NewNodeHostID creates a NodeHostID instance based on the specified id value.
func NewRandomNodeHostID ¶
func NewRandomNodeHostID() *NodeHostID
NewRandomNodeHostID creates a NodeHostID with randomly assigned ID value.
func ParseNodeHostID ¶
func ParseNodeHostID(v string) (*NodeHostID, error)
ParseNodeHostID creates a NodeHostID instance based on the specified string representation of the NodeHost ID.
func (*NodeHostID) Marshal ¶
func (n *NodeHostID) Marshal() ([]byte, error)
Marshal marshals the NodeHostID instances.
func (*NodeHostID) MarshalTo ¶
func (n *NodeHostID) MarshalTo(result []byte) (int, error)
MarshalTo is not implemented
func (*NodeHostID) String ¶
func (n *NodeHostID) String() string
String returns a string representation of the NodeHostID instance.
func (*NodeHostID) Unmarshal ¶
func (n *NodeHostID) Unmarshal(data []byte) error
Unmarshal unmarshals the NodeHostID instance.
func (*NodeHostID) Value ¶
func (n *NodeHostID) Value() uint64
Value returns the uint64 representation of the NodeHostID.