Documentation ¶
Index ¶
- Constants
- type HashDiff
- type Node
- func (n *Node) AddSite(ctx context.Context, s *d.Site) (*d.SuccessReturn, error)
- func (n *Node) Connect(r string) error
- func (n *Node) GetInfo(ctx context.Context, r *d.Info) (*d.Info, error)
- func (n *Node) Info() *d.Info
- func (n *Node) Merge(r string) error
- func (n *Node) Push(o *tangle.Object) error
- func (n *Node) RemoteStatus(s string) (*Status, error)
- func (n *Node) Run()
- func (n *Node) Splice(stream d.DistributionService_SpliceServer) error
- func (n *Node) Status() Status
- func (n *Node) Submit(o *tangle.Object) error
- type Status
Constants ¶
View Source
const (
// MaxMsgSize specifies the largest packet size for grpc calls
MaxMsgSize = 5242880
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Tangle *tangle.Tangle ListenInterface string Version string APIAddr string Hooks struct { PreAdd string } // contains filtered or unexported fields }
Node is a wrapper around the chain. Nodes are the backbone of the network
func New ¶
func New(c config.Configuration) (*Node, error)
New constructs a new node from the configuration
func (*Node) RemoteStatus ¶
RemoteStatus returns the status of a connected remote
func (*Node) Splice ¶
func (n *Node) Splice(stream d.DistributionService_SpliceServer) error
Splice injects the recieved sites into the tangle
type Status ¶
type Status struct { Address string `json:"address"` Version string `json:"version"` Length uint64 `json:"length"` Connections []string `json:"connections"` Recomendations []string `json:"recomendations"` Hashes []hash.Hash `json:"-"` HashDiff HashDiff `json:"-"` }
Status is used for reporting this nodes configuration to other nodes
Click to show internal directories.
Click to hide internal directories.