transport

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LibP2P = "libp2p"
	LibSSB = "ssb"
	WebAPI = "webapi"
)
View Source
const (
	EthereumAddressBook = "ethereum"
	StaticAddressBook   = "static"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BootstrapDependencies

type BootstrapDependencies struct {
	Logger log.Logger
}

type Dependencies

type Dependencies struct {
	Signer ethereum.Signer
	Feeds  []ethereum.Address
	Logger log.Logger
}

type LibP2PConfig added in v0.9.0

type LibP2PConfig struct {
	PrivKeySeed      string   `yaml:"privKeySeed"`
	ListenAddrs      []string `yaml:"listenAddrs"`
	BootstrapAddrs   []string `yaml:"bootstrapAddrs"`
	DirectPeersAddrs []string `yaml:"directPeersAddrs"`
	BlockedAddrs     []string `yaml:"blockedAddrs"`
	DisableDiscovery bool     `yaml:"disableDiscovery"`
}

type ScuttlebuttCapsConfig added in v0.9.0

type ScuttlebuttCapsConfig struct {
	Shs    string `yaml:"shs"`
	Sign   string `yaml:"sign"`
	Invite string `yaml:"invite,omitempty"`
}

type ScuttlebuttConfig added in v0.9.0

type ScuttlebuttConfig struct {
	Caps string `yaml:"caps"`
}

type Transport

type Transport struct {
	Transport any               `yaml:"transport"`
	P2P       LibP2PConfig      `yaml:"libp2p"`
	SSB       ScuttlebuttConfig `yaml:"ssb"`
	WebAPI    WebAPIConfig      `yaml:"webapi"`
}

func (*Transport) Configure

func (*Transport) ConfigureP2PBoostrap

func (c *Transport) ConfigureP2PBoostrap(d BootstrapDependencies) (transport.Transport, error)

type WebAPIConfig added in v0.9.0

type WebAPIConfig struct {
	ListenAddr          string                           `yaml:"listenAddr"`
	Socks5ProxyAddr     string                           `yaml:"socks5ProxyAddr"`
	AddressBookType     any                              `yaml:"addressBookType"`
	EthereumAddressBook *WebAPIEthereumAddressBookConfig `yaml:"ethereumAddressBook"`
	StaticAddressBook   *WebAPIStaticAddressBookConfig   `yaml:"staticAddressBook"`
}

type WebAPIEthereumAddressBookConfig added in v0.9.0

type WebAPIEthereumAddressBookConfig struct {
	AddressBookAddr ethereum.Address `yaml:"addressBookAddr"`
	Ethereum        ethereumConfig.Ethereum
}

type WebAPIStaticAddressBookConfig added in v0.9.0

type WebAPIStaticAddressBookConfig struct {
	RemoteAddrs []string `yaml:"remoteAddrs"`
}

Jump to

Keyboard shortcuts

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