http

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ServerContext           = "http"
	UnsuccessfulTxsResource = "/unsuccessful-txs"
	ResubmitTxs             = "/resubmit-txs"
	PrometheusMetrics       = "/metrics"
)
View Source
const MonitoringLoggerContext = "monitoring"

Variables

This section is empty.

Functions

func Router

func Router(logRegistry *nlogger.Registry, storage relay.Storage, txProcessor relay.TXProcessor, submittedTxsTasksQueue chan relay.PendingSubmittedTxInfo) *mux.Router

func Run

func Run(ctx context.Context, logRegistry *nlogger.Registry, storage relay.Storage, txProcessor relay.TXProcessor, submittedTxsTasksQueue chan relay.PendingSubmittedTxInfo, ListenAddr string) error

Types

type ICQClient

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

ICQClient provides high level methods to work with ICQ webserver api

func NewICQClient

func NewICQClient(host string) (*ICQClient, error)

NewICQClient takes a host as a single argument and returns an ICQClient in case of well formatted host arg host format is <scheme>://<host>[:<port>], e.g. http://myicq.host, https://myicq.host, http://myicq.host:8080

func (ICQClient) GetUnsuccessfulTxs

func (c ICQClient) GetUnsuccessfulTxs() ([]relay.UnsuccessfulTxInfo, error)

func (ICQClient) ResubmitTxs

func (c ICQClient) ResubmitTxs(txs ResubmitRequest) error

type PromWrapper

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

func NewPromWrapper

func NewPromWrapper(logRegistry *nlogger.Registry, storage relay.Storage) PromWrapper

func (PromWrapper) ServeHTTP

func (p PromWrapper) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ResubmitRequest

type ResubmitRequest struct {
	Txs []ResubmitTx `json:"txs"`
}

type ResubmitTx

type ResubmitTx struct {
	QueryID uint64 `json:"query_id"`
	Hash    string `json:"hash"`
}

Jump to

Keyboard shortcuts

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