controller

package
v0.0.0-...-cc45bd3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionController

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

ConnectionController holds the API logic for all routes under /hosts

func NewConnectionController

NewConnectionController initializes a new host controller with the provided services.

func (*ConnectionController) List

func (cc *ConnectionController) List(c *gin.Context)

List lists returns all connections for the given provide id

type DialController

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

DialController holds the API logic for all routes under /hosts

func NewDialController

func NewDialController(ctx context.Context, ds service.DialService, ps service.ProvideService) *DialController

NewDialController initializes a new host controller with the provided services.

func (*DialController) List

func (hc *DialController) List(c *gin.Context)

List lists returns all running libp2p hosts.

type HostController

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

HostController holds the API logic for all routes under /hosts

func NewHostController

func NewHostController(ctx context.Context, hs service.HostService) *HostController

NewHostController initializes a new host controller with the provided services.

func (*HostController) Archive

func (hc *HostController) Archive(c *gin.Context)

func (*HostController) Bootstrap

func (hc *HostController) Bootstrap(c *gin.Context)

func (*HostController) Create

func (hc *HostController) Create(c *gin.Context)

Create starts a new libp2p host.

func (*HostController) Get

func (hc *HostController) Get(c *gin.Context)

func (*HostController) List

func (hc *HostController) List(c *gin.Context)

List lists returns all running libp2p hosts.

func (*HostController) Start

func (hc *HostController) Start(c *gin.Context)

func (*HostController) Stop

func (hc *HostController) Stop(c *gin.Context)

type MeasurementController

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

MeasurementController holds the API logic for all routes under /hosts

func NewProvideMeasurementController

func NewProvideMeasurementController(ctx context.Context, hs service.HostService, ms service.MeasurementService) *MeasurementController

NewProvideMeasurementController initializes a new host controller with the provided services.

func (*MeasurementController) Create

func (rpc *MeasurementController) Create(c *gin.Context)

Create starts a new provide measurement

func (*MeasurementController) Stop

func (rpc *MeasurementController) Stop(c *gin.Context)

Stop stops the given provide measurement

type PeerController

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

PeerController holds the API logic for all routes in /hosts

func NewPeerController

func NewPeerController(ctx context.Context, ps service.PeerService) *PeerController

NewPeerController initializes a new host controller with the provided services.

func (*PeerController) Get

func (pc *PeerController) Get(c *gin.Context)

type ProvideController

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

func (*ProvideController) Create

func (pc *ProvideController) Create(c *gin.Context)

func (*ProvideController) Get

func (pc *ProvideController) Get(c *gin.Context)

func (*ProvideController) Graph

func (pc *ProvideController) Graph(c *gin.Context)

func (*ProvideController) List

func (pc *ProvideController) List(c *gin.Context)

type RPCController

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

RPCController holds the API logic for all routes under /hosts

func NewRPCController

func NewRPCController(ctx context.Context, hs service.HostService, gpService service.GetProvidersService) *RPCController

NewRPCController initializes a new host controller with the provided services.

func (*RPCController) GetProviders

func (rpc *RPCController) GetProviders(c *gin.Context)

GetProviders runs a GET_PROVIDERS RPC against the given host for the given target key.

type RetrievalController

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

func (*RetrievalController) Create

func (rc *RetrievalController) Create(c *gin.Context)

func (*RetrievalController) List

func (rc *RetrievalController) List(c *gin.Context)

type RoutingTableController

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

RoutingTableController holds the API logic for all routes under /hosts

func NewRoutingTableController

func NewRoutingTableController(ctx context.Context, rts service.RoutingTableService, hs service.HostService) *RoutingTableController

NewRoutingTableController initializes a new host controller with the provided services.

func (*RoutingTableController) Create

func (rtc *RoutingTableController) Create(c *gin.Context)

Create starts a new libp2p host.

func (*RoutingTableController) Current

func (rtc *RoutingTableController) Current(c *gin.Context)

func (*RoutingTableController) Get

func (rtc *RoutingTableController) Get(c *gin.Context)

func (*RoutingTableController) List

func (rtc *RoutingTableController) List(c *gin.Context)

func (*RoutingTableController) Listen

func (rtc *RoutingTableController) Listen(c *gin.Context)

func (*RoutingTableController) Refresh

func (rtc *RoutingTableController) Refresh(c *gin.Context)

Jump to

Keyboard shortcuts

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