gateway

package
v2.13.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatedGatewaySpec added in v2.3.0

func ValidatedGatewaySpec(tomlString string) (job.Job, error)

Types

type ConnectionManager

type ConnectionManager interface {
	job.ServiceCtx
	network.ConnectionAcceptor

	DONConnectionManager(donId string) *donConnectionManager
	GetPort() int
}

ConnectionManager holds all connections between Gateway and Nodes.

func NewConnectionManager

func NewConnectionManager(gwConfig *config.GatewayConfig, clock clockwork.Clock, lggr logger.Logger) (ConnectionManager, error)

type Delegate added in v2.3.0

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

func NewDelegate added in v2.3.0

func NewDelegate(legacyChains legacyevm.LegacyChainContainer, ks keystore.Eth, ds sqlutil.DataSource, lggr logger.Logger) *Delegate

func (*Delegate) AfterJobCreated added in v2.3.0

func (d *Delegate) AfterJobCreated(spec job.Job)

func (*Delegate) BeforeJobCreated added in v2.3.0

func (d *Delegate) BeforeJobCreated(spec job.Job)

func (*Delegate) BeforeJobDeleted added in v2.3.0

func (d *Delegate) BeforeJobDeleted(spec job.Job)

func (*Delegate) JobType added in v2.3.0

func (d *Delegate) JobType() job.Type

func (*Delegate) OnDeleteJob added in v2.3.0

func (d *Delegate) OnDeleteJob(context.Context, job.Job) error

func (*Delegate) ServicesForSpec added in v2.3.0

func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services []job.ServiceCtx, err error)

ServicesForSpec returns the scheduler to be used for running observer jobs

type Gateway

type Gateway interface {
	job.ServiceCtx
	gw_net.HTTPRequestHandler

	GetUserPort() int
	GetNodePort() int
}

func NewGateway

func NewGateway(codec api.Codec, httpServer gw_net.HttpServer, handlers map[string]handlers.Handler, connMgr ConnectionManager, lggr logger.Logger) Gateway

func NewGatewayFromConfig

func NewGatewayFromConfig(config *config.GatewayConfig, handlerFactory HandlerFactory, lggr logger.Logger) (Gateway, error)

type HandlerFactory added in v2.3.0

type HandlerFactory interface {
	NewHandler(handlerType HandlerType, handlerConfig json.RawMessage, donConfig *config.DONConfig, don handlers.DON) (handlers.Handler, error)
}

func NewHandlerFactory added in v2.3.0

func NewHandlerFactory(legacyChains legacyevm.LegacyChainContainer, ds sqlutil.DataSource, lggr logger.Logger) HandlerFactory

type HandlerType

type HandlerType = string
const (
	FunctionsHandlerType HandlerType = "functions"
	DummyHandlerType     HandlerType = "dummy"
)

Jump to

Keyboard shortcuts

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