common

package
v0.22.8-patch-7 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: AGPL-3.0 Imports: 17 Imported by: 15

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func FlowClient added in v0.22.8

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

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

func InitProtocolState added in v0.12.0

func InitProtocolState(db *badger.DB, storages *storage.All) (protocol.State, error)

func InitStorage

func InitStorage(datadir string) *badger.DB

func InitStorageWithTruncate added in v0.11.0

func InitStorageWithTruncate(datadir string, truncate bool) *badger.DB

func InitStorages added in v0.12.0

func InitStorages(db *badger.DB) *storage.All

func PrettyPrint added in v0.13.0

func PrettyPrint(entity interface{})

PrettyPrint an interface

func PrettyPrintEntity added in v0.12.0

func PrettyPrintEntity(entity flow.Entity)

PrettyPrintEntity pretty print a flow entity

Types

type FlowClientConfig added in v0.22.8

type FlowClientConfig struct {
	AccessAddress    string
	AccessNodePubKey string
	Insecure         bool
}

func FlowClientConfigs added in v0.22.8

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

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

func NewFlowClientConfig added in v0.22.8

func NewFlowClientConfig(accessAddress, accessApiNodePubKey string, insecure bool) (*FlowClientConfig, error)

NewFlowClientConfig returns *FlowClientConfig

func (*FlowClientConfig) String added in v0.22.8

func (f *FlowClientConfig) String() string

Jump to

Keyboard shortcuts

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