api

package
v0.0.0-...-4b9a48e Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MAGIC_VALUE = [4]byte{0x16, 0x26, 0xba, 0x7e}
)

Functions

func HealthMiddleware

func HealthMiddleware(next http.Handler) http.Handler

HealthMiddleware is a middleware that responds to health checks

func OptionsMiddleware

func OptionsMiddleware(h http.Handler) http.Handler

OptionsMiddleware ensures that we return the correct headers for CORS requests

func RequestSizeLimitMiddleware

func RequestSizeLimitMiddleware(limit int64) func(http.Handler) http.Handler

Types

type BodyEncoding

type BodyEncoding string
const (
	BodyEncodingBase64 BodyEncoding = "base64"
)

type Server

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

func NewServer

func NewServer(chainID *big.Int, db *db.DB, evm engine.EVMRequester, userOpQueue *queue.Service, pools *ws.ConnectionPools) *Server

func (*Server) AddMiddleware

func (s *Server) AddMiddleware(cr *chi.Mux) *chi.Mux

func (*Server) AddRoutes

func (s *Server) AddRoutes(cr *chi.Mux, b *bucket.Bucket) *chi.Mux

func (*Server) CreateBaseRouter

func (s *Server) CreateBaseRouter() *chi.Mux

func (*Server) Start

func (s *Server) Start(port int, handler http.Handler) error

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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