Documentation ¶
Index ¶
- Constants
- type Host
- func (h *Host) Addresses() []string
- func (h *Host) BuildDiscoveryAndRouting() error
- func (h *Host) BuildPubSub() (*pubsub.PubSub, error)
- func (h *Host) BuildRPC(ch chan error, ps *pubsub.PubSub) error
- func (h *Host) Connect(peers []string) error
- func (h *Host) ID() string
- func (h *Host) IPFSAddresses() []string
- func (h *Host) RPCAddress() string
- func (h *Host) Start(ch chan error, stop chan os.Signal) error
Constants ¶
View Source
const ( // ErrUnknownTransportOption is returned when an unknown transport has been specified ErrUnknownTransportOption = cerr.Error("unknown transport option") // ErrImproperTransportOption is returned when an improper transport has been specified (e.g. 'none' with other options) ErrImproperTransportOption = cerr.Error("unknown improper option") // ErrUnknownMuxerOption is returned when an unknown muxer has been specified ErrUnknownMuxerOption = cerr.Error("unknown muxer option") // ErrImproperMuxerOption is returned when an improper muxer option format has been provided. It expects ['name', 'type'] ErrImproperMuxerOption = cerr.Error("improper muxer option") // ErrUnknownSecurityOption is returned when an unknown security option has been specified ErrUnknownSecurityOption = cerr.Error("unknown security option") // ErrNilRouter is returned when a router is needed but not found ErrNilRouter = cerr.Error("nil router") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host is the gossipsub host note: lhost.Host and lrouter.Routing are interfaces
func New ¶
New returns a new host note: not passing reference to config because want it to be read only.
func (*Host) BuildDiscoveryAndRouting ¶
BuildDiscoveryAndRouting ...
func (*Host) BuildPubSub ¶
BuildPubSub returns a pubsub service
func (*Host) Connect ¶
Connect connects the host to the list of peers note: it expects the peers to be in IPFS form
func (*Host) IPFSAddresses ¶ added in v0.1.0
IPFSAddresses returns the ipfs listening addresses of the host
func (*Host) RPCAddress ¶ added in v0.1.2
RPCAddress returns the host rpc address
Click to show internal directories.
Click to hide internal directories.