httpx

package
v0.0.0-...-ddfbed8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Metrics *ServerMetrics
	// contains filtered or unexported fields
}

func NewServer

func NewServer(serverConfig ServerConfig) (*Server, error)

func (*Server) RegisterMetrics

func (s *Server) RegisterMetrics(registry *prometheus.Registry)

RegisterMetrics registers the prometheus metrics

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	Ctx                context.Context
	Port               uint16
	AdminPort          uint16
	TLSConfig          *TLSConfig
	PrometheusRegistry *prometheus.Registry

	StellarWithdrawalHandler  *controllers.StellarWithdrawalHandler
	StellarRefundHandler      *controllers.StellarRefundHandler
	EthereumWithdrawalHandler *controllers.EthereumWithdrawalHandler
	EthereumRefundHandler     *controllers.EthereumRefundHandler

	TestDepositHandler *controllers.TestDeposit
}

type ServerMetrics

type ServerMetrics struct {
	RequestDurationSummary *prometheus.SummaryVec
}

type TLSConfig

type TLSConfig struct {
	CertPath, KeyPath string
}

Jump to

Keyboard shortcuts

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