server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: AGPL-3.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package server Algod REST API.

Index

Constants

View Source
const (

	// TokenHeader is the header where we put the token.
	TokenHeader = "X-Algo-API-Token"
	// MaxRequestBodyBytes is the maximum request body size that we allow in our APIs.
	MaxRequestBodyBytes = "10MB"
)

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(logger logging.Logger, node APINodeInterface, shutdown <-chan struct{}, apiToken string, adminAPIToken string, listener net.Listener, numConnectionsLimit uint64) *echo.Echo

NewRouter builds and returns a new router with our REST handlers registered.

Types

type APINode

type APINode struct{ *node.AlgorandFullNode }

APINode wraps the AlgorandFullNode to provide v2.NodeInterface.

func (APINode) LedgerForAPI

func (n APINode) LedgerForAPI() v2.LedgerForAPI

LedgerForAPI implements the v2.Handlers interface

type APINodeInterface

type APINodeInterface interface {
	lib.NodeInterface
	v2.NodeInterface
}

APINodeInterface describes all the node methods required by common and v2 APIs, and the server/router

type FollowerNode

type FollowerNode struct{ *node.AlgorandFollowerNode }

FollowerNode wraps the AlgorandFollowerNode to provide v2.NodeInterface.

func (FollowerNode) LedgerForAPI

func (n FollowerNode) LedgerForAPI() v2.LedgerForAPI

LedgerForAPI implements the v2.Handlers interface

Directories

Path Synopsis
lib
v1
v2
generated/data
Package data provides primitives to interact with the openapi HTTP API.
Package data provides primitives to interact with the openapi HTTP API.
generated/experimental
Package experimental provides primitives to interact with the openapi HTTP API.
Package experimental provides primitives to interact with the openapi HTTP API.
generated/model
Package model provides primitives to interact with the openapi HTTP API.
Package model provides primitives to interact with the openapi HTTP API.
generated/nonparticipating/private
Package private provides primitives to interact with the openapi HTTP API.
Package private provides primitives to interact with the openapi HTTP API.
generated/nonparticipating/public
Package public provides primitives to interact with the openapi HTTP API.
Package public provides primitives to interact with the openapi HTTP API.
generated/participating/private
Package private provides primitives to interact with the openapi HTTP API.
Package private provides primitives to interact with the openapi HTTP API.
generated/participating/public
Package public provides primitives to interact with the openapi HTTP API.
Package public provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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