Documentation ¶
Index ¶
- Constants
- type RESTGateway
- func (g *RESTGateway) CobraInit(cmdName string) (cmd *cobra.Command)
- func (g *RESTGateway) Conf() *RESTGatewayConf
- func (g *RESTGateway) DispatchMsgAsync(ctx context.Context, msg map[string]interface{}, ack, immediateReceipt bool) (messages.WebhookReply, int, error)
- func (g *RESTGateway) Init() (receipts.ReceiptStorePersistence, error)
- func (g *RESTGateway) SetConf(conf *RESTGatewayConf)
- func (g *RESTGateway) Start() (err error)
- func (g *RESTGateway) ValidateConf() (err error)
- type RESTGatewayConf
- type WebhooksDirectConf
Constants ¶
const (
// MaxHeaderSize max size of content
MaxHeaderSize = 16 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RESTGateway ¶
type RESTGateway struct {
// contains filtered or unexported fields
}
RESTGateway as the HTTP gateway interface for ethconnect
func NewRESTGateway ¶
func NewRESTGateway(printYAML *bool) (g *RESTGateway)
NewRESTGateway constructor
func (*RESTGateway) CobraInit ¶
func (g *RESTGateway) CobraInit(cmdName string) (cmd *cobra.Command)
CobraInit retruns a cobra command to configure this KafkaBridge
func (*RESTGateway) Conf ¶
func (g *RESTGateway) Conf() *RESTGatewayConf
Conf gets the config for this bridge
func (*RESTGateway) DispatchMsgAsync ¶
func (g *RESTGateway) DispatchMsgAsync(ctx context.Context, msg map[string]interface{}, ack, immediateReceipt bool) (messages.WebhookReply, int, error)
DispatchMsgAsync is the rest2eth interface method for async dispatching of messages (via our webhook logic)
func (*RESTGateway) Init ¶
func (g *RESTGateway) Init() (receipts.ReceiptStorePersistence, error)
ReceiptStorePersistence allows other components to access the receipt store persistence for idempotency checks, when co-located in the same address space
func (*RESTGateway) SetConf ¶
func (g *RESTGateway) SetConf(conf *RESTGatewayConf)
SetConf sets the config for this bridge
func (*RESTGateway) Start ¶
func (g *RESTGateway) Start() (err error)
Start kicks off the HTTP listener and router
func (*RESTGateway) ValidateConf ¶
func (g *RESTGateway) ValidateConf() (err error)
ValidateConf validates the config
type RESTGatewayConf ¶
type RESTGatewayConf struct { Kafka kafka.KafkaCommonConf `json:"kafka"` MongoDB receipts.MongoDBReceiptStoreConf `json:"mongodb"` LevelDB receipts.LevelDBReceiptStoreConf `json:"leveldb"` MemStore receipts.ReceiptStoreConf `json:"memstore"` OpenAPI contractgateway.SmartContractGatewayConf `json:"openapi"` HTTP struct { LocalAddr string `json:"localAddr"` Port int `json:"port"` TLS utils.TLSConfig `json:"tls"` } `json:"http"` WebhooksDirectConf }
RESTGatewayConf defines the YAML config structure for a webhooks bridge instance
type WebhooksDirectConf ¶
type WebhooksDirectConf struct { MaxInFlight int `json:"maxInFlight"` tx.TxnProcessorConf eth.RPCConf }
WebhooksDirectConf defines the YAML structore for a Webhooks direct to RPC bridge