mobile

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Types

type Node

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

func NewNode

func NewNode(o *Options) (*Node, error)

func (*Node) Stop

func (n *Node) Stop() error

type Options

type Options struct {
	// api setting
	EnableTLS      bool
	ApiPort        int
	DebugAPIPort   int
	EnableDebugAPI bool

	// vpn setting
	VpnEnable    bool
	VpnGroupName string
	VpnPort      int

	// proxy setting
	ProxyEnable    bool
	ProxyGroupName string
	ProxyPort      int

	// group setting json
	Group string

	// rpc setting
	WebsocketPort int

	// p2p setup
	NetworkID      int64 // default type uint64
	P2PPort        int
	WelcomeMessage string

	// kademlia
	BinMaxPeers   int
	LightMaxPeers int

	// cache size
	CacheCapacity int64 // default type uint64

	// node bootstrap
	BootNodes      string // default type []string
	EnableDevNode  bool
	EnableFullNode bool

	// chain setting
	ChainEndpoint  string
	OracleContract string

	// traffic stat
	EnableFlowStat bool
	FlowContract   string

	// domain resolver
	ResolverOptions string // default type []string

	// security
	Password string
	DataPath string

	// leveldb opts
	BlockCacheCapacity     int64 // default type uint64
	OpenFilesLimit         int64 // default type uint64
	WriteBufferSize        int64 // default type uint64
	DisableSeeksCompaction bool

	// misc
	Verbosity string
}

Options represents the collection of configuration values to fine tune the node embedded into a mobile process. The available values are a subset of the entire API provided by node to reduce the maintenance surface and dev complexity.

func (Options) APIAddr

func (o Options) APIAddr(c *node.Options)

func (Options) Bootnodes

func (o Options) Bootnodes(c *node.Options)

func (Options) DataDir

func (o Options) DataDir(c *node.Options)

func (Options) DebugAPIAddr

func (o Options) DebugAPIAddr(c *node.Options)

func (Options) EnableApiTLS

func (o Options) EnableApiTLS(c *node.Options)

func (Options) Groups added in v1.4.1

func (o Options) Groups(c *node.Options)

func (Options) IsDev

func (o Options) IsDev(c *node.Options)

func (Options) KadBinMaxPeers

func (o Options) KadBinMaxPeers(c *node.Options)

func (Options) LightNodeMaxPeers

func (o Options) LightNodeMaxPeers(c *node.Options)

func (Options) OracleContractAddress

func (o Options) OracleContractAddress(c *node.Options)

func (Options) ProxyAddr added in v1.4.1

func (o Options) ProxyAddr(c *node.Options)

func (Options) ProxyGroup added in v1.4.1

func (o Options) ProxyGroup(c *node.Options)

func (Options) ResolverConnectionCfgs

func (o Options) ResolverConnectionCfgs(c *node.Options)

func (Options) TrafficContractAddr

func (o Options) TrafficContractAddr(c *node.Options)

func (Options) TrafficEnable

func (o Options) TrafficEnable(c *node.Options)

func (Options) VpnGroup added in v1.4.1

func (o Options) VpnGroup(c *node.Options)

func (Options) VpnListen added in v1.4.1

func (o Options) VpnListen(c *node.Options)

func (Options) WSAddr

func (o Options) WSAddr(c *node.Options)

Jump to

Keyboard shortcuts

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