id

package
v0.0.0-...-a582c34 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrInvalidNodeHostID indicates that the NodeHost ID value provided is
	// invalid
	ErrInvalidNodeHostID = errors.New("invalid NodeHost ID value")
)

Functions

func IsNodeHostID

func IsNodeHostID(v string) bool

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.

Jump to

Keyboard shortcuts

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