registration

package
v1.17.12 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

DEPRECATED: This package is deprecated and will be removed in a future release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOrUpdateWithRetries

func RegisterOrUpdateWithRetries(ctx context.Context, bmNode Node, numTries int)

RegisterOrUpdateWithRetries registers bandwidth-marketplace Node in blockchain if node is not registered or updates if is with retries.

If an error occurs during execution, the program terminates with code 2 and the last error will be written in os.Stderr.

RegisterOrUpdateWithRetries should be used only once while application is starting.

Types

type Node

type Node interface {
	// RegistrationFuncName returns name of magma sc function used for registration Node.
	RegistrationFuncName() string

	// UpdateNodeFuncName returns name of magma sc function used for updating Node.
	UpdateNodeFuncName() string

	// IsNodeRegisteredRP returns name of magma sc relative path for checking registration of Node.
	IsNodeRegisteredRP() string

	// ExternalID returns external ID of Node
	ExternalID() string

	// Encode encodes Node in json bytes.
	Encode() []byte
}

Node represent bandwidth-marketplace node that can be registered.

Jump to

Keyboard shortcuts

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