ion

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// Node ID
	NID string
	// contains filtered or unexported fields
}

Node .

func NewNode

func NewNode(nid string) Node

NewNode .

func (*Node) Close

func (n *Node) Close()

Close .

func (*Node) GetNeighborNodes

func (n *Node) GetNeighborNodes() map[string]discovery.Node

GetNeighborNodes get neighbor nodes.

func (*Node) KeepAlive

func (n *Node) KeepAlive(node discovery.Node) error

KeepAlive Upload your node info to registry.

func (*Node) NatsConn

func (n *Node) NatsConn() *nats.Conn

NatsConn .

func (*Node) NewNatsRPCClient added in v1.9.1

func (n *Node) NewNatsRPCClient(service, peerNID string, parameters map[string]interface{}) (*nrpc.Client, error)

func (*Node) ServiceRegistrar

func (n *Node) ServiceRegistrar() grpc.ServiceRegistrar

ServiceRegistrar return grpc.ServiceRegistrar of this node, used to create grpc services

func (*Node) Start

func (n *Node) Start(natURL string) error

Start .

func (*Node) Watch

func (n *Node) Watch(service string) error

Watch the neighbor nodes

Jump to

Keyboard shortcuts

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