common

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: MIT Imports: 21 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetBoostrapper

type NetBoostrapper interface {
	app.Net
	GetIpfsLite() *ipfslite.Peer
	Bootstrap(addrs []peer.AddrInfo)
}

DefaultNetwork is a boostrapable default Net with sane defaults.

func DefaultNetwork

func DefaultNetwork(repoPath string, opts ...NetOption) (NetBoostrapper, error)

type NetConfig

type NetConfig struct {
	HostAddr    ma.Multiaddr
	ConnManager cconnmgr.ConnManager
	Debug       bool
	GRPCOptions []grpc.ServerOption
}

type NetOption

type NetOption func(c *NetConfig) error

func WithConnectionManager added in v0.1.18

func WithConnectionManager(cm cconnmgr.ConnManager) NetOption

func WithNetDebug

func WithNetDebug(enabled bool) NetOption

func WithNetGRPCOptions

func WithNetGRPCOptions(opts ...grpc.ServerOption) NetOption

func WithNetHostAddr

func WithNetHostAddr(addr ma.Multiaddr) NetOption

Jump to

Keyboard shortcuts

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