entrypoint

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PublicPort  int      `env:"PUBLIC_PORT" default:"0"`
	Service     []string `env:"SERVICE_ENDPOINT" default:""`
	StaticFiles string   `env:"STATIC_FILES" default:""`
	SQSURL      string   `env:"SQS_URL" default:""`

	PostgresOutboxURI string `env:"POSTGRES_OUTBOX" default:""`
	SNSPrefix         string `env:"SNS_PREFIX" default:""`

	CORSOrigins []string `env:"CORS_ORIGINS" default:""`

	JWKS []string `env:"JWKS" default:""`
}

type Runtime

type Runtime struct {
	Worker     *sqslink.Worker
	Sender     *outbox.SNSBatcher
	JWKS       *jwks.JWKSManager
	PublicPort int
	// contains filtered or unexported fields
}

func FromConfig

func FromConfig(envConfig Config, awsConfig aws.Config) (*Runtime, error)

func NewRuntime

func NewRuntime() *Runtime

func (*Runtime) AddEndpoint

func (rt *Runtime) AddEndpoint(endpoint string) error

func (*Runtime) AddJWKS

func (rt *Runtime) AddJWKS(sources ...string) error

func (*Runtime) AddOutbox

func (rt *Runtime) AddOutbox(outboxURI string) error

func (*Runtime) AddRouter

func (rt *Runtime) AddRouter(port int, router *proxy.Router) error

func (*Runtime) Close

func (rt *Runtime) Close() error

func (*Runtime) Run

func (rt *Runtime) Run(ctx context.Context) error

func (*Runtime) StaticFiles

func (rt *Runtime) StaticFiles(dirname string) error

Jump to

Keyboard shortcuts

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