metadata

package
v0.0.0-...-49f93d6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	// contains filtered or unexported fields
}

func New

func New() *Meta

New creates new metadata structure

func (*Meta) Apply

func (M *Meta) Apply(items ...Metadata) error

Apply applies Metadata updates over context

func (*Meta) Copy

func (M *Meta) Copy() Meta

Copy metadata

func (*Meta) Get

func (M *Meta) Get(items ...Metadata) MetadataInfo

Get public metadata attributes

func (*Meta) Update

func (M *Meta) Update(with *Meta)

Update metadata

type Metadata

type Metadata func(*metadataContext) error

Metadata option applies metaadata to a smart node.

func TTL

func TTL(value time.Duration) Metadata

TTL sets a TTL duratioin to the node in metadata. It triggers a change to the node's expirationTime

type MetadataInfo

type MetadataInfo struct {
	ExpirationTime uint64
}

MetadataInfo is a container for the reporting of the current public metadata of a semantic node. We report directly the metadata internal value type, not the metadataType

Jump to

Keyboard shortcuts

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