common

package
v0.1.13-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 20 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
	Debug       bool
	GRPCOptions []grpc.ServerOption
}

type NetOption

type NetOption func(c *NetConfig) error

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