Documentation
¶
Index ¶
- type HostCmd
- type HostListenCmd
- type HostNotifyCmd
- type HostStartCmd
- type HostState
- func (s *HostState) CloseHost() error
- func (s *HostState) GetEnr() *enr.Record
- func (s *HostState) GetIP() net.IP
- func (s *HostState) GetPriv() crypto.PrivKey
- func (s *HostState) GetTCP() uint16
- func (s *HostState) GetUDP() uint16
- func (s *HostState) Host() (h host.Host, err error)
- func (s *HostState) SetHost(h host.Host) error
- func (s *HostState) SetIP(ip net.IP)
- func (s *HostState) SetTCP(port uint16)
- func (s *HostState) SetUDP(port uint16)
- type HostStopCmd
- type HostViewCmd
- type WithCloseHost
- type WithSetEnr
- type WithSetHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostCmd ¶
type HostCmd struct {
*base.Base
GlobalPeerstores track.Peerstores
CurrentPeerstore track.DynamicPeerstore
WithSetHost
WithSetEnr
WithCloseHost
}
type HostListenCmd ¶
type HostListenCmd struct {
*base.Base
WithSetEnr
IP net.IP `ask:"--ip" help:"If no IP is specified, network interfaces are checked for one."`
TcpPort uint16 `ask:"--tcp" help:"If no tcp port is specified, it defaults to 9000."`
UdpPort uint16 `ask:"--udp" help:"If no udp port is specified (= 0), UDP equals TCP."`
}
func (*HostListenCmd) Default ¶
func (c *HostListenCmd) Default()
func (*HostListenCmd) Help ¶
func (c *HostListenCmd) Help() string
type HostNotifyCmd ¶
func (*HostNotifyCmd) Help ¶
func (c *HostNotifyCmd) Help() string
func (*HostNotifyCmd) HelpLong ¶
func (c *HostNotifyCmd) HelpLong() string
type HostStartCmd ¶
type HostStartCmd struct {
*base.Base
WithSetHost
GlobalPeerstores track.Peerstores
CurrentPeerstore track.DynamicPeerstore
PrivKey flags.P2pPrivKeyFlag `ask:"--priv" help:"hex-encoded private key for libp2p host. Random if none is specified."`
TransportsStrArr []string `ask:"--transport" help:"Transports to use. Options: tcp, ws"`
MuxStrArr []string `ask:"--mux" help:"Multiplexers to use"`
SecurityArr []string `ask:"--security" help:"Security to use. Multiple can be selected, order matters. Options: secio, noise, tls, none"`
RelayEnabled bool `ask:"--relay" help:"enable relayer functionality"`
LoPeers int `ask:"--lo-peers" help:"low-water for connection manager to trim peer count to"`
HiPeers int `ask:"--hi-peers" help:"high-water for connection manager to trim peer count from"`
GracePeriod time.Duration `ask:"--peer-grace-period" help:"Time to grace a peer from being trimmed"`
NatEnabled bool `ask:"--nat" help:"enable nat address discovery (upnp/pmp)"`
UserAgent string `ask:"--agent" help:"user agent string to use in libp2p identify protocol"`
}
func (*HostStartCmd) Default ¶
func (c *HostStartCmd) Default()
func (*HostStartCmd) Help ¶
func (c *HostStartCmd) Help() string
type HostState ¶
type HostState struct {
IP net.IP
TcpPort uint16
UdpPort uint16
// contains filtered or unexported fields
}
type HostStopCmd ¶
type HostStopCmd struct {
*base.Base
WithCloseHost
}
func (*HostStopCmd) Help ¶
func (c *HostStopCmd) Help() string
type HostViewCmd ¶
func (*HostViewCmd) Help ¶
func (c *HostViewCmd) Help() string
type WithCloseHost ¶
type WithCloseHost interface {
CloseHost() error
}
type WithSetEnr ¶
type WithSetHost ¶
Click to show internal directories.
Click to hide internal directories.