Help us shape the future of Go! Take the 2026 Go Developer Survey

grpcclient

package
v0.37.9 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAccessAPIPort       = "9000"
	DefaultAccessAPISecurePort = "9001"
)

Variables

This section is empty.

Functions

func DefaultAccessNodeIDS

func DefaultAccessNodeIDS(snapshot protocol.Snapshot) ([]flow.Identifier, error)

DefaultAccessNodeIDS will return all the access node IDS in the protocol state for staked access nodes

func FlowClient

func FlowClient(conf *FlowClientConfig) (*client.Client, error)

FlowClient will return a secure or insecure flow client depending on *FlowClientConfig.Insecure

func FlowIDFromHexString

func FlowIDFromHexString(accessNodeIDS ...string) ([]flow.Identifier, error)

FlowIDFromHexString convert flow node id(s) from hex string(s) to flow identifier(s)

Types

type FlowClientConfig

type FlowClientConfig struct {
	AccessAddress    string
	AccessNodePubKey string
	AccessNodeID     flow.Identifier
	Insecure         bool
}

func FlowClientConfigs

func FlowClientConfigs(accessNodeIDS []flow.Identifier, insecureAccessAPI bool, snapshot protocol.Snapshot) ([]*FlowClientConfig, error)

FlowClientConfigs will assemble connection options for the flow client for each access node id

func NewFlowClientConfig

func NewFlowClientConfig(accessAddress, accessApiNodePubKey string, accessNodeID flow.Identifier, insecure bool) (*FlowClientConfig, error)

NewFlowClientConfig returns *FlowClientConfig

func (*FlowClientConfig) String

func (f *FlowClientConfig) String() string

Jump to

Keyboard shortcuts

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