mmn

package
v0.0.0-...-365054f Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(httpClient *requests.HTTPClient, mmnAddress string, signer identity.SignerFactory) *client

NewClient returns MMN API client

Types

type MMN

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

MMN struct

func NewMMN

func NewMMN(resolver ip.Resolver, client *client) *MMN

NewMMN creates new instance of MMN

func (m *MMN) ClaimLink(redirectURL *url.URL) (*url.URL, error)

ClaimLink generate claim link

func (*MMN) ClaimNode

func (m *MMN) ClaimNode() error

ClaimNode registers node to MMN

func (*MMN) Subscribe

func (m *MMN) Subscribe(eventBus eventbus.EventBus) error

Subscribe subscribes to node events and reports them to MMN

type NodeClaimRequest

type NodeClaimRequest struct {
	// local IP is used to give quick access to WebUI from MMN
	LocalIP     string `json:"local_ip"`
	Identity    string `json:"identity"`
	APIKey      string `json:"api_key"`
	VendorID    string `json:"vendor_id"`
	OS          string `json:"os"`
	Arch        string `json:"arch"`
	NodeVersion string `json:"node_version"`
	RedirectURL string `json:"redirect_url,omitempty"`
}

NodeClaimRequest contains node information to be sent to MMN

Jump to

Keyboard shortcuts

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