registry

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	Client *client.Client
	// contains filtered or unexported fields
}

Registry is a decentralized key-value store that allows storing small amounts of data on Sia hosts.

See https://blog.sia.tech/the-host-registry-building-dynamic-content-on-skynet-ade72ba6f30b

func New

New initialises and returns a new Registry instance.

func (Registry) Read

func (r Registry) Read(dataKey crypto.Hash) (skymodules.Skylink, uint64, error)

Read reads a registry entry and returns the SkylinkV2 it contains, as well as the revision.

func (Registry) Write

func (r Registry) Write(skylink string, dataKey crypto.Hash, rev uint64) (skymodules.Skylink, error)

Write updates the registry entry with the given dataKey to contain the given skylink. Returns a SkylinkV2.

Jump to

Keyboard shortcuts

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