peers

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEndpoints

func AddEndpoints(accountManager server.AccountManager, authCfg configs.AuthCfg, router *mux.Router)

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is a handler that returns peers of the account

func NewHandler

func NewHandler(accountManager server.AccountManager, authCfg configs.AuthCfg) *Handler

NewHandler creates a new peers Handler

func (*Handler) GetAccessiblePeers

func (h *Handler) GetAccessiblePeers(w http.ResponseWriter, r *http.Request)

GetAccessiblePeers returns a list of all peers that the specified peer can connect to within the network.

func (*Handler) GetAllPeers

func (h *Handler) GetAllPeers(w http.ResponseWriter, r *http.Request)

GetAllPeers returns a list of all peers associated with a provided account

func (*Handler) HandlePeer

func (h *Handler) HandlePeer(w http.ResponseWriter, r *http.Request)

HandlePeer handles all peer requests for GET, PUT and DELETE operations

Jump to

Keyboard shortcuts

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