grpcclient

package
v1.67.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: BSD-3-Clause Imports: 15 Imported by: 27

Documentation

Index

Constants

View Source
const (
	UNKNOWN = 0
	NOTSYNC = 1
	SYNC    = 2
)

节点同步状态

View Source
const SyncLbName = "sync"

SyncLbName is the name of sync balancer.

Variables

This section is empty.

Functions

func NewMainChainClient

func NewMainChainClient(cfg *types.Chain33Config, grpcaddr string) (types.Chain33Client, error)

NewMainChainClient 创建一个平行链的 主链 grpc chain33 客户端

func NewMultipleURL

func NewMultipleURL(url string) string

NewMultipleURL 创建url

func NewSyncURL added in v1.67.1

func NewSyncURL(url string) string

NewSyncURL 创建url

func SetAddrInfo added in v1.67.1

func SetAddrInfo(addr resolver.Address, addrInfo AddrInfo) resolver.Address

SetAddrInfo returns a copy of addr in which the Attributes field is updated with addrInfo.

Types

type AddrInfo added in v1.67.1

type AddrInfo struct {
	State int
}

AddrInfo will be stored inside Address metadata in order to use weighted balancer.

func GetAddrInfo added in v1.67.1

func GetAddrInfo(addr resolver.Address) AddrInfo

GetAddrInfo returns the AddrInfo stored in the Attributes fields of addr.

Jump to

Keyboard shortcuts

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