gateway

package
v2.5.1-automation-2023... Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 26 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 utils.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 evm.LegacyChainContainer, ks keystore.Eth, 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(spec job.Job, q pg.Queryer) error

func (*Delegate) ServicesForSpec added in v2.3.0

func (d *Delegate) ServicesForSpec(spec job.Job, qopts ...pg.QOpt) (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 evm.LegacyChainContainer, lggr logger.Logger) HandlerFactory

type HandlerType

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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