Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DefaultMaximumCommandRuntime int
}
Config defines configuration for this provider
type Dependencies ¶
type Dependencies struct { Logger zerolog.Logger CommandRuns providers.CommandRunStorer CommandStorer providers.CommandStorer RepositoryStorer providers.RepositoryStorer Clock providers.Clock }
Dependencies defines dependencies for this provider
type InMemoryExecutor ¶ added in v0.0.10
type InMemoryExecutor struct { Config Dependencies // contains filtered or unexported fields }
InMemoryExecutor defines an Executor which runs commands alongside Krok. It saves runs in a map and constantly updates it. Cancelling will go over all processes belonging to that run and kill them.
func NewInMemoryExecutor ¶ added in v0.0.10
func NewInMemoryExecutor(cfg Config, deps Dependencies) *InMemoryExecutor
NewInMemoryExecutor creates a new InMemoryExecutor which will hold all runs in its memory. In case of a crash, human intervention will be required. TODO: Later, save runs in db with the process id to cancel so Krok can pick up runs again.
Click to show internal directories.
Click to hide internal directories.