skyd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// BlockHashes adds the given hashes to the block list. It returns which
	// hashes were blocked, which hashes were invalid and potentially an error.
	BlockHashes([]database.Hash) ([]database.Hash, []database.Hash, error)
	// IsSkydUp returns true if the skyd API instance is up.
	IsSkydUp() bool
	// ResolveSkylink tries to resolve the given skylink to a V1 skylink.
	ResolveSkylink(skymodules.Skylink) (skymodules.Skylink, error)
}

API defines the skyd API interface. It's an interface for testing purposes, as this allows to easily mock it and alleviates the need for a skyd instance.

func NewAPI

func NewAPI(skydHost, skydPassword string, skydPort int, db *database.DB, logger *logrus.Logger) (API, error)

NewAPI creates a new API instance.

Jump to

Keyboard shortcuts

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