Documentation ¶
Index ¶
- Constants
- func GetReqID(ctx context.Context) string
- func HandleHealthz(w http.ResponseWriter, r *http.Request)
- func Main(gitVersion string) func(*cli.Context) error
- type ChainData
- type ChainDataReader
- type Config
- type ContextKey
- type Error
- type EstimateResponse
- type HistoryResponse
- type RPCDisbursement
- type RPCTeleport
- type Server
- func (s *Server) HandleEstimate(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (s *Server) HandleHistory(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (s *Server) HandleStatus(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (s *Server) HandleTrack(ctx context.Context, w http.ResponseWriter, r *http.Request) error
- func (s *Server) ListenAndServe(host string, port uint16) error
- type StatusError
- type StatusResponse
- type TrackResponse
Constants ¶
View Source
const ( ContentTypeHeader = "Content-Type" ContentTypeJSON = "application/json" )
View Source
const TeleportrAPINamespace = "teleportr_api"
Variables ¶
This section is empty.
Functions ¶
func HandleHealthz ¶
func HandleHealthz(w http.ResponseWriter, r *http.Request)
Types ¶
type ChainDataReader ¶
func NewCachingChainDataReader ¶
func NewCachingChainDataReader(inner ChainDataReader, interval time.Duration) ChainDataReader
func NewChainDataReader ¶
func NewChainDataReader( l1Client, l2Client *ethclient.Client, depositContractAddr, disburserWalletAddr common.Address, depositContract *deposit.TeleportrDeposit, disburserContract *disburse.TeleportrDisburser, ) ChainDataReader
type Config ¶
type Config struct { Hostname string Port uint16 L1EthRpc string L2EthRpc string DepositAddress string NumConfirmations uint64 DisburserWalletAddress string DisburserAddress string PostgresHost string PostgresPort uint16 PostgresUser string PostgresPassword string PostgresDBName string PostgresEnableSSL bool MetricsServerEnable bool MetricsHostname string MetricsPort uint64 DisableHTTP2 bool }
type EstimateResponse ¶
type HistoryResponse ¶
type HistoryResponse struct {
Teleports []RPCTeleport `json:"teleports"`
}
type RPCDisbursement ¶
type RPCTeleport ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleEstimate ¶
func (*Server) HandleHistory ¶
func (*Server) HandleStatus ¶
func (*Server) HandleTrack ¶
type StatusError ¶
func (StatusError) Error ¶
func (se StatusError) Error() string
func (StatusError) Status ¶
func (se StatusError) Status() int
type StatusResponse ¶
type StatusResponse struct { DisburserWalletBalanceWei string `json:"disburser_wallet_balance_wei"` DepositContractBalanceWei string `json:"deposit_contract_balance_wei"` MaximumBalanceWei string `json:"maximum_balance_wei"` MinDepositAmountWei string `json:"min_deposit_amount_wei"` MaxDepositAmountWei string `json:"max_deposit_amount_wei"` DisbursementLag uint64 `json:"disbursement_lag"` IsAvailable bool `json:"is_available"` }
type TrackResponse ¶
type TrackResponse struct { CurrentBlockNumber string `json:"current_block_number"` ConfirmationsRequired string `json:"confirmations_required"` ConfirmationsRemaining string `json:"confirmations_remaining"` Teleport RPCTeleport `json:"teleport"` }
Click to show internal directories.
Click to hide internal directories.