Versions in this module Expand all Collapse all v0 v0.1.1 Aug 24, 2023 v0.1.0 Aug 9, 2023 Changes in this version + var ConfigPath human.Path = defaultConfigPath + func CreateRegistry(config *Config) (*timemachine.Registry, error) + func NewRuntime(ctx context.Context, config *Config) (wazero.Runtime, error) + func OpenConfig() (io.ReadCloser, string, error) + func OpenRegistry(config *Config) (*timemachine.Registry, error) + func Version() string + type Config struct + Cache struct{ ... } + Registry struct{ ... } + func DefaultConfig() *Config + func LoadConfig() (*Config, error) + func ReadConfig(r io.Reader) (*Config, error) + type ExitError uint32 + func (e ExitError) Error() string + type HTTPRequest struct + Body []byte + Headers http.Header + Method string + Path string + Port int + type HTTPResponse struct + Body []byte + Headers http.Header + StatusCode int + type LogSpec struct + BatchSize int + Compression timemachine.Compression + ProcessID ProcessID + StartTime time.Time + func (l *LogSpec) Fork() *LogSpec + type ModuleSpec struct + Args []string + Dials []string + Dirs []string + Env []string + Function string + HostNetworkBinding bool + Listens []string + OutboundProxy *ModuleSpec + Path string + Sockets string + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + Trace io.Writer + func (m *ModuleSpec) Key() string + type Option struct + func Some(v T) Option[T] + func (v *Option[T]) UnmarshalJSON(b []byte) error + func (v *Option[T]) UnmarshalYAML(node *yaml.Node) error + func (v Option[T]) MarshalJSON() ([]byte, error) + func (v Option[T]) MarshalYAML() (any, error) + func (v Option[T]) Value() (T, bool) + type ProcessID = uuid.UUID + type ProcessInfo struct + Addr netip.Addr + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + ID ProcessID + ParentID *ProcessID + type ProcessManager struct + func NewProcessManager(ctx context.Context, registry *timemachine.Registry, runtime wazero.Runtime, ...) *ProcessManager + func (pm *ProcessManager) Close() error + func (pm *ProcessManager) Lookup(processID ProcessID) (process ProcessInfo, ok bool) + func (pm *ProcessManager) Start(moduleSpec ModuleSpec, logSpec *LogSpec, parentID *ProcessID) (ProcessID, error) + func (pm *ProcessManager) Wait(processID ProcessID) error + func (pm *ProcessManager) WaitAll() error + type Replay struct + func NewReplay(registry *timemachine.Registry, runtime wazero.Runtime, processID uuid.UUID) *Replay + func (r *Replay) ModuleCode(ctx context.Context) ([]byte, string, error) + func (r *Replay) RecordReader(ctx context.Context) (records stream.ReadCloser[timemachine.Record], startTime time.Time, err error) + func (r *Replay) Replay(ctx context.Context) error + func (r *Replay) ReplayRecords(ctx context.Context, function string, moduleCode []byte, ...) error + func (r *Replay) ReplayRecordsModule(ctx context.Context, function string, compiledModule wazero.CompiledModule, ...) error + func (r *Replay) SetStderr(w io.Writer) + func (r *Replay) SetStdout(w io.Writer) + func (r *Replay) SetTrace(w io.Writer) + type Server struct + func (s *Server) Close() error + func (s *Server) DiscardTasks(ctx context.Context, req *connect.Request[v1.DiscardTasksRequest]) (*connect.Response[v1.DiscardTasksResponse], error) + func (s *Server) Kill(ctx context.Context, req *connect.Request[v1.KillRequest]) (*connect.Response[v1.KillResponse], error) + func (s *Server) LookupTasks(ctx context.Context, req *connect.Request[v1.LookupTasksRequest]) (*connect.Response[v1.LookupTasksResponse], error) + func (s *Server) PollTasks(ctx context.Context, req *connect.Request[v1.PollTasksRequest]) (*connect.Response[v1.PollTasksResponse], error) + func (s *Server) ProcessID(context.Context, *connect.Request[v1.ProcessIDRequest]) (*connect.Response[v1.ProcessIDResponse], error) + func (s *Server) Serve(l net.Listener) error + func (s *Server) Spawn(ctx context.Context, req *connect.Request[v1.SpawnRequest]) (*connect.Response[v1.SpawnResponse], error) + func (s *Server) SubmitTasks(ctx context.Context, req *connect.Request[v1.SubmitTasksRequest]) (*connect.Response[v1.SubmitTasksResponse], error) + func (s *Server) Version(context.Context, *connect.Request[v1.VersionRequest]) (*connect.Response[v1.VersionResponse], error) + type ServerFactory struct + ProcessManager *ProcessManager + Scheduler *TaskScheduler + func (f *ServerFactory) NewServer(ctx context.Context, processID uuid.UUID, moduleSpec ModuleSpec, ...) *Server + type TaskGroup struct + func NewTaskGroup(s *TaskScheduler) *TaskGroup + func (g *TaskGroup) Close() error + func (g *TaskGroup) Discard(id TaskID) (ok bool) + func (g *TaskGroup) Lookup(id TaskID) (task TaskInfo, ok bool) + func (g *TaskGroup) Poll() <-chan TaskID + func (g *TaskGroup) Submit(moduleSpec ModuleSpec, logSpec *LogSpec, input TaskInput, processID ProcessID) (TaskID, error) + type TaskID = uuid.UUID + type TaskInfo struct + type TaskInput interface + type TaskOutput interface + type TaskScheduler struct + ProcessManager *ProcessManager + func (s *TaskScheduler) Close() error + func (s *TaskScheduler) Discard(id TaskID) (ok bool) + func (s *TaskScheduler) Lookup(id TaskID) (task TaskInfo, ok bool) + func (s *TaskScheduler) Submit(moduleSpec ModuleSpec, logSpec *LogSpec, input TaskInput, processID ProcessID, ...) (TaskID, error) + type TaskState int + const Error + const Executing + const Initializing + const Queued + const Success