api

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsNamespace = "op_indexer_api"

	// Endpoint paths
	// NOTE - This can be further broken out over time as new version iterations
	// are implemented
	HealthPath      = "/healthz"
	DepositsPath    = "/api/v0/deposits/"
	WithdrawalsPath = "/api/v0/withdrawals/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v1.2.0

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

Api ... Indexer API struct TODO : Structured error responses

func NewApi

func NewApi(logger log.Logger, bv database.BridgeTransfersView, serverConfig config.ServerConfig, metricsConfig config.ServerConfig) *API

NewApi ... Construct a new api instance

func (*API) Port added in v1.2.0

func (a *API) Port() int

Port ... Returns the the port that server is listening on

func (*API) Run added in v1.2.0

func (a *API) Run(ctx context.Context) error

Run ... Runs the API server routines

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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