--- title: internal/runtime description: Go API reference for the runtime package. --- # runtime ```go import "github.com/jbcom/radioactive-ralph/internal/runtime" ``` Package runtime owns the durable repo service engine and its local process coordination helpers. ## Index - [type Options](<#Options>) - [type RunnerFactory](<#RunnerFactory>) - [type Service](<#Service>) - [func NewService\(opts Options\) \(\*Service, error\)](<#NewService>) - [func \(s \*Service\) Run\(ctx context.Context\) error](<#Service.Run>) - [func \(s \*Service\) Shutdown\(\)](<#Service.Shutdown>) ## type [Options]() Options configures one repo\-scoped runtime instance. ```go type Options struct { RepoPath string TickInterval time.Duration HeartbeatInterval time.Duration ShutdownTimeout time.Duration RunnerFactory RunnerFactory SessionMode plandag.SessionMode SessionTransport plandag.SessionTransport VariantFilter variant.Name ExitWhenIdle bool } ``` ## type [RunnerFactory]() RunnerFactory resolves a configured provider binding into a runnable backend. ```go type RunnerFactory func(binding provider.Binding) (provider.Runner, error) ``` ## type [Service]() Service is the durable repo\-scoped runtime authority. ```go type Service struct { // contains filtered or unexported fields } ``` ### func [NewService]() ```go func NewService(opts Options) (*Service, error) ``` NewService constructs a repo\-scoped runtime with validated defaults. ### func \(\*Service\) [Run]() ```go func (s *Service) Run(ctx context.Context) error ``` Run starts the repo runtime and blocks until shutdown or context cancel. ### func \(\*Service\) [Shutdown]() ```go func (s *Service) Shutdown() ``` Shutdown asks the service loop to stop gracefully. Generated by [gomarkdoc]()