nodeinfo

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStaticProfileList

func NewStaticProfileList(nodes []NetworkNode) []profiles.StaticProfile

func NodeAddr

func NodeAddr(n NetworkNode) string

func NodeRef

func NodeRef(n NetworkNode) reference.Global

func NodeRole

func NodeRole(n NetworkNode) member.PrimaryRole

Types

type AuthorizationCertificate

type AuthorizationCertificate interface {
	Meta

	GetRole() member.PrimaryRole
	SerializeNodePart() []byte
	GetDiscoverySigns() map[reference.Global][]byte
}

AuthorizationCertificate interface provides methods to manage info about node from it certificate

type Certificate

type Certificate interface {
	AuthorizationCertificate

	GetDiscoveryNodes() []DiscoveryNode

	GetMajorityRule() int
	GetMinRoles() (virtual uint, heavyMaterial uint, lightMaterial uint)
}

Certificate interface provides methods to manage keys

type CertificateGetter

type CertificateGetter interface {
	// GetCert registers reference and returns new certificate for it
	GetCert(context.Context, reference.Global) (Certificate, error)
}

type CertificateManager

type CertificateManager interface {
	GetCertificate() Certificate
}

CertificateManager interface provides methods to manage nodes certificate

type DiscoveryNode

type DiscoveryNode interface {
	Meta
	GetHost() string
}

type Meta

type Meta interface {
	GetNodeRef() reference.Global
	GetPublicKey() crypto.PublicKey
}

type NetworkNode

type NetworkNode = profiles.ActiveNode

func NewNetworkNode

func NewNetworkNode(profile profiles.ActiveNode) NetworkNode

func NewNetworkNodeList

func NewNetworkNodeList(profiles []profiles.ActiveNode) []NetworkNode

Jump to

Keyboard shortcuts

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