bootstrap

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractClient

type ContractClient = *wrapper.Wrapper

ContractClient represents the Netmap contract client.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper.Wrapper.

type NodeInfo

type NodeInfo = netmap.Info

NodeInfo represents the information about storage node.

It is a type alias of github.com/nspcc-dev/neofs-node/pkg/core/netmap.Info.

type Registerer

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

Registerer represents the tool that registers storage node in NeoFS system.

Working Registerer must be created via constructor New. Using the Registerer that has been created with new(Registerer) expression (or just declaring a Registerer variable) is unsafe and can lead to panic.

func New

func New(client ContractClient, info NodeInfo) (*Registerer, error)

New creates, initializes and returns the Registerer instance.

If passed contract client is nil, wrapper.ErrNilWrapper is returned.

func (*Registerer) Bootstrap

func (r *Registerer) Bootstrap(context.Context)

Bootstrap registers storage node in NeoFS system through Netmap contract client.

If contract client returns error, panic arises without retry.

Jump to

Keyboard shortcuts

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