api

package
v0.0.0-...-a45f9b5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeId    = "nodeId"
	SessionId = "sessionId"
)

Variables

This section is empty.

Functions

func HealthCheckHandler

func HealthCheckHandler() http.Handler

func NewHandler

func NewHandler(services APIServices) http.Handler

Types

type APIHandler

type APIHandler struct {
	chi.Router
	// contains filtered or unexported fields
}

func NewAPIHandler

func NewAPIHandler(
	sessions sessions.CacheService,
	erigonNode erigon_node.Client,
) *APIHandler

func (*APIHandler) BodiesDownload

func (h *APIHandler) BodiesDownload(w http.ResponseWriter, r *http.Request)

func (*APIHandler) GetSession

func (h *APIHandler) GetSession(w http.ResponseWriter, r *http.Request)

func (*APIHandler) HeadersDownload

func (h *APIHandler) HeadersDownload(w http.ResponseWriter, r *http.Request)

func (*APIHandler) Log

func (h *APIHandler) Log(w http.ResponseWriter, r *http.Request)

func (*APIHandler) ReOrg

func (h *APIHandler) ReOrg(w http.ResponseWriter, r *http.Request)

func (*APIHandler) SyncStages

func (h *APIHandler) SyncStages(w http.ResponseWriter, r *http.Request)

func (*APIHandler) Tables

func (h *APIHandler) Tables(w http.ResponseWriter, r *http.Request)

func (*APIHandler) UniversalRequest

func (h *APIHandler) UniversalRequest(w http.ResponseWriter, r *http.Request)

type APIServices

type APIServices struct {
	ErigonNode   erigon_node.Client
	StoreSession sessions.CacheService
}

type BridgeHandler

type BridgeHandler struct {
	chi.Router
	// contains filtered or unexported fields
}

func NewBridgeHandler

func NewBridgeHandler(cacheSvc sessions.CacheService) BridgeHandler

func (BridgeHandler) Bridge

func (h BridgeHandler) Bridge(w http.ResponseWriter, r *http.Request)

type GetVersionResponse

type GetVersionResponse struct {
	NodeVersion uint64 `json:"node_version"`
	CodeVersion string `json:"code_version"`
	GitCommit   string `json:"git_commit"`
}

type SessionResponse

type SessionResponse struct {
	IsActive   bool                 `json:"is_active"`
	SessionPin uint64               `json:"session_pin"`
	Nodes      []*sessions.NodeInfo `json:"nodes"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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