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 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 Config ¶
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 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.