discovery

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func Register

func Register(rc *grc.RemoteConfig)

Types

type GRCWrapper

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

func (*GRCWrapper) GetNodes

func (m *GRCWrapper) GetNodes(svc string) map[string]int

GetNodes returns rpc service nodes.

func (*GRCWrapper) RegisterNode

func (m *GRCWrapper) RegisterNode(component, rpcAddr string, rpcSvc []string, ttl time.Duration) (int64, error)

RegisterNode registers rpc address of the component node.

func (*GRCWrapper) RegisteredNode

func (m *GRCWrapper) RegisteredNode(component string) (int64, string)

RegisteredNode returns service unique ID and rpc address registered for the component.

type Node

type Node struct {
	UniqueID int64
	Address  string
}

Jump to

Keyboard shortcuts

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