noderecord

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleUnknown = NodeRole(iota)
	RoleVirtual
	RoleHeavyMaterial
	RoleLightMaterial
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRecord

type NodeRecord struct {
	foundation.BaseContract

	PublicKey string
	Role      NodeRole
}

NodeRecord contains info about node

func NewNodeRecord

func NewNodeRecord(pk string, roleS string) *NodeRecord

New creates new NodeRecord

func (*NodeRecord) Destroy

func (nr *NodeRecord) Destroy()

SelfDestroy makes request to destroy current node record

func (*NodeRecord) GetPublicKey

func (nr *NodeRecord) GetPublicKey() string

func (*NodeRecord) GetRole

func (nr *NodeRecord) GetRole() NodeRole

type NodeRole

type NodeRole int

func GetRoleFromString

func GetRoleFromString(role string) NodeRole

Jump to

Keyboard shortcuts

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