rest

package
v0.0.0-...-d3d27b2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
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

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

Jump to

Keyboard shortcuts

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