httpHost

package
v0.0.0-...-2f75c38 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	*gin.Engine

	Port  int
	Peers map[string]p2pnetwork.PeerInfos
	// contains filtered or unexported fields
}

func NewHttpProvider

func NewHttpProvider(port int, id string) (*Host, error)

func (*Host) AddNewPeer

func (h *Host) AddNewPeer(id, ip string, port int)

func (*Host) AddPeer

func (h *Host) AddPeer() func(c *gin.Context)

func (*Host) ListPeers

func (h *Host) ListPeers() func(c *gin.Context)

func (*Host) RemovePeer

func (h *Host) RemovePeer() func(c *gin.Context)

func (*Host) String

func (h *Host) String() string

Jump to

Keyboard shortcuts

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