Documentation ¶
Index ¶
- type Host
- func (h *Host) CloseAllPeerConnections(ctx context.Context, _ *empty.Empty) (*pb.CloseAllPeerConnectionsReply, error)
- func (h *Host) ClosePeerConnections(ctx context.Context, peersList *pb.PeersList) (*pb.ClosePeerConnectionsReply, error)
- func (h *Host) ID(ctx context.Context, _ *empty.Empty) (*pb.IDReply, error)
- func (h *Host) ListConnectedPeers(ctx context.Context, _ *empty.Empty) (*pb.PeersList, error)
- func (h *Host) Listen(ctx context.Context, addr string) error
- func (h *Host) ListenAddresses(ctx context.Context, _ *empty.Empty) (*pb.ListenAddressesReply, error)
- func (h *Host) OpenPeersConnections(ctx context.Context, peersList *pb.PeersList) (*pb.OpenPeersConnectionsReplies, error)
- func (h *Host) PublishMessage(ctx context.Context, in *pb.Message) (*pb.PublishReply, error)
- func (h *Host) Shutdown(ctx context.Context, _ *empty.Empty) (*pb.ShutdownReply, error)
- type Props
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host listens on grpc
func (*Host) CloseAllPeerConnections ¶
func (h *Host) CloseAllPeerConnections(ctx context.Context, _ *empty.Empty) (*pb.CloseAllPeerConnectionsReply, error)
CloseAllPeerConnections closes all connections note: is this working correctly?
func (*Host) ClosePeerConnections ¶
func (h *Host) ClosePeerConnections(ctx context.Context, peersList *pb.PeersList) (*pb.ClosePeerConnectionsReply, error)
ClosePeerConnections closes connections to listed peers
func (*Host) ListConnectedPeers ¶
ListConnectedPeers lists the host's connected peers
func (*Host) ListenAddresses ¶
func (h *Host) ListenAddresses(ctx context.Context, _ *empty.Empty) (*pb.ListenAddressesReply, error)
ListenAddresses returns the addresses on which the libp2p is listening
func (*Host) OpenPeersConnections ¶
func (h *Host) OpenPeersConnections(ctx context.Context, peersList *pb.PeersList) (*pb.OpenPeersConnectionsReplies, error)
OpenPeersConnections opens connections to listed peers
func (*Host) PublishMessage ¶
PublishMessage implements
Click to show internal directories.
Click to hide internal directories.