raptor

package
v0.0.0-...-391c3f1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInitialized         = errors.New("sandbox is not initialized")
	ErrorEnvironmentUnhealthy = errors.New("environment is unhealthy")
)

Functions

This section is empty.

Types

type Address

type Address interface {
	String() string
	Protocol() string

	UpdateFromListener(listener net.Listener)
}

type App

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

func StartApp

func StartApp(deps rapid.Dependencies, telemetryFDSocketPath, metadataToken string, raptorLogger raptorLogger) (*App, error)

func (*App) Done

func (a *App) Done() <-chan struct{}

func (*App) Err

func (a *App) Err() model.AppError

func (*App) HandleHealthCheck

func (a *App) HandleHealthCheck() interop.HealthCheckResponse

func (*App) Init

func (*App) Invoke

func (a *App) Invoke(ctx context.Context, invokeMsg interop.InvokeRequest, metrics interop.InvokeMetrics) (err model.AppError, wasResponseSent bool)

func (*App) ReserveIdleRuntime

func (a *App) ReserveIdleRuntime(ctx context.Context, invokeID interop.InvokeID, timeout time.Duration) (interop.ReserveIdleRuntimeResponse, model.AppError)

func (*App) RuntimeAPIAddrPort

func (a *App) RuntimeAPIAddrPort() netip.AddrPort

func (*App) Shutdown

func (a *App) Shutdown(shutdownReason model.AppError)

func (*App) StartProcessTerminationMonitor

func (a *App) StartProcessTerminationMonitor()

type MockAddress

type MockAddress struct {
	mock.Mock
}

func NewMockAddress

func NewMockAddress(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAddress

func (*MockAddress) Protocol

func (_m *MockAddress) Protocol() string

func (*MockAddress) String

func (_m *MockAddress) String() string

func (*MockAddress) UpdateFromListener

func (_m *MockAddress) UpdateFromListener(listener net.Listener)

type Server

type Server struct {
	Addr Address
	// contains filtered or unexported fields
}

func StartServer

func StartServer(shutdownHandler shutdownHandler, handler http.Handler, addr Address) (*Server, error)

func (*Server) AttachShutdownSignalHandler

func (s *Server) AttachShutdownSignalHandler(sigCh chan os.Signal)

func (*Server) Done

func (s *Server) Done() <-chan struct{}

func (*Server) Err

func (s *Server) Err() error

func (*Server) Shutdown

func (s *Server) Shutdown(err error)

type TCPAddress

type TCPAddress struct {
	AddrPort netip.AddrPort
}

func (*TCPAddress) Protocol

func (t *TCPAddress) Protocol() string

func (*TCPAddress) String

func (t *TCPAddress) String() string

func (*TCPAddress) UpdateFromListener

func (t *TCPAddress) UpdateFromListener(listener net.Listener)

type UnixAddress

type UnixAddress struct {
	Path string
}

func (*UnixAddress) Protocol

func (u *UnixAddress) Protocol() string

func (*UnixAddress) String

func (u *UnixAddress) String() string

func (*UnixAddress) UpdateFromListener

func (u *UnixAddress) UpdateFromListener(listener net.Listener)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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