controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiController

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

func NewApiController

func NewApiController(
	whitelistEnabled bool,
	repositories repositories.Repos,
	actions actions.Actions,
) *ApiController

func (ApiController) PingHandler

func (c ApiController) PingHandler(w http.ResponseWriter, r *http.Request)

func (ApiController) RPCHandler added in v0.2.0

func (c ApiController) RPCHandler(w http.ResponseWriter, r *http.Request)

func (ApiController) RegisterHandler

func (c ApiController) RegisterHandler(w http.ResponseWriter, r *http.Request)

func (ApiController) SaveMetricsHandler

func (c ApiController) SaveMetricsHandler(w http.ResponseWriter, r *http.Request)

type MetricsRequest

type MetricsRequest struct {
	PeerCount             int32 `json:"peer_count"`
	BestBlockHeight       int64 `json:"best_block_height"`
	FinalizedBlockHeight  int64 `json:"finalized_block_height"`
	ReadyTransactionCount int32 `json:"ready_transaction_count"`
}

type RegisterRequest

type RegisterRequest struct {
	Id            string `json:"id"`
	ConfigHash    string `json:"config_hash"`
	PayoutAddress string `json:"payout_address"`
}

type RegisterResponse

type RegisterResponse struct {
	Token               string `json:"token"`
	TunnelServerAddress string `json:"tunnel_server_address"`
}

Jump to

Keyboard shortcuts

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