Documentation
¶
Index ¶
- func AcceptedCommandResults(count int) []workers.CommandResult
- func AcceptedProviderResponse() interfaces.InferenceResponse
- func AgentFactoryPath(t *testing.T, rel string) string
- func AssertArgsContainSequence(t *testing.T, args, want []string)
- func AssertSingleWorkRequestEvent(t *testing.T, events []factoryapi.FactoryEvent, ...)
- func AssertSingleWorkRequestEventByWorkName(t *testing.T, events []factoryapi.FactoryEvent, workName, workTypeName string)
- func BuildModelWorkerConfig(provider interfaces.ModelProvider, model string) string
- func ClearSeedInputs(t *testing.T, dir string)
- func CountFactoryEvents(events []factoryapi.FactoryEvent, eventType factoryapi.FactoryEventType) int
- func DispatchInputWorksFromHistory(t *testing.T, events []factoryapi.FactoryEvent, event factoryapi.FactoryEvent, ...) []factoryapi.Work
- func FactoryRelationsValue(value *[]factoryapi.Relation) []factoryapi.Relation
- func FactoryWorksValue(value *[]factoryapi.Work) []factoryapi.Work
- func FirstInputToken(rawTokens any) interfaces.Token
- func HasWorkTokenInPlace(marking petri.MarkingSnapshot, placeID, workID string) bool
- func LastFactoryEventTick(events []factoryapi.FactoryEvent) int
- func LegacyFixtureDir(t *testing.T, name string) string
- func NewStaticSuccessCommandRunner(stdout string) workers.CommandRunner
- func PlaceTokenCount(marking petri.MarkingSnapshot, placeID string) int
- func ProviderCallsForWorker(provider *testutil.MockProvider, workerType string) []interfaces.ProviderInferenceRequest
- func ProviderCommandRequestsForWorker(runner *testutil.ProviderCommandRunner, workerType string) []workers.CommandRequest
- func ProviderErrorCorpusEntry(t *testing.T, name string) workerprovider.ProviderErrorCorpusEntry
- func RejectedProviderResponse(content string) interfaces.InferenceResponse
- func ResolvedRuntimePath(factoryDir, configuredPath string) string
- func ScaffoldFactory(t *testing.T, cfg map[string]any) string
- func ScaffoldFactoryFromExamplePNG(t *testing.T, relPath string) string
- func SetWorkingDirectory(t *testing.T, dir string)
- func SkipLongFunctional(t *testing.T, reason string)
- func StringPointerValue[T ~string](value *T) string
- func UpdateFactoryConfig(t *testing.T, dir string, mutate func(map[string]any))
- func WaitForHarnessPlaceTokenCount(t *testing.T, h *testutil.ServiceTestHarness, placeID string, want int, ...)
- func WithWorkingDirectory(t *testing.T, dir string, fn func())
- func WriteAgentConfig(t *testing.T, dir, workerName, content string)
- func WriteWorkRequestFile(t *testing.T, path string, request interfaces.SubmitRequest)
- func WriteWorkstationConfig(t *testing.T, dir, workstationName, content string)
- type FunctionalAPIServer
- func (fs *FunctionalAPIServer) Done() <-chan struct{}
- func (fs *FunctionalAPIServer) GetEngineStateSnapshot(t *testing.T) *interfaces.EngineStateSnapshot[petri.MarkingSnapshot, *state.Net]
- func (fs *FunctionalAPIServer) GetFactoryEvents(t *testing.T) []factoryapi.FactoryEvent
- func (fs *FunctionalAPIServer) Stop(t *testing.T)
- func (fs *FunctionalAPIServer) URL() string
- type FunctionalAPIServerConfig
- type RecordingCommandRunner
- type TokenIdentitySet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptedCommandResults ¶
func AcceptedCommandResults(count int) []workers.CommandResult
func AcceptedProviderResponse ¶
func AcceptedProviderResponse() interfaces.InferenceResponse
func AssertSingleWorkRequestEvent ¶
func AssertSingleWorkRequestEvent(t *testing.T, events []factoryapi.FactoryEvent, requestID, workID, workTypeName string)
func AssertSingleWorkRequestEventByWorkName ¶
func AssertSingleWorkRequestEventByWorkName(t *testing.T, events []factoryapi.FactoryEvent, workName, workTypeName string)
func BuildModelWorkerConfig ¶
func BuildModelWorkerConfig(provider interfaces.ModelProvider, model string) string
func ClearSeedInputs ¶
func CountFactoryEvents ¶
func CountFactoryEvents(events []factoryapi.FactoryEvent, eventType factoryapi.FactoryEventType) int
func DispatchInputWorksFromHistory ¶ added in v0.0.3
func DispatchInputWorksFromHistory( t *testing.T, events []factoryapi.FactoryEvent, event factoryapi.FactoryEvent, payload factoryapi.DispatchRequestEventPayload, ) []factoryapi.Work
func FactoryRelationsValue ¶ added in v0.0.4
func FactoryRelationsValue(value *[]factoryapi.Relation) []factoryapi.Relation
func FactoryWorksValue ¶
func FactoryWorksValue(value *[]factoryapi.Work) []factoryapi.Work
func FirstInputToken ¶
func FirstInputToken(rawTokens any) interfaces.Token
func HasWorkTokenInPlace ¶
func HasWorkTokenInPlace(marking petri.MarkingSnapshot, placeID, workID string) bool
func LastFactoryEventTick ¶
func LastFactoryEventTick(events []factoryapi.FactoryEvent) int
func NewStaticSuccessCommandRunner ¶ added in v0.0.4
func NewStaticSuccessCommandRunner(stdout string) workers.CommandRunner
func PlaceTokenCount ¶
func PlaceTokenCount(marking petri.MarkingSnapshot, placeID string) int
func ProviderCallsForWorker ¶
func ProviderCallsForWorker(provider *testutil.MockProvider, workerType string) []interfaces.ProviderInferenceRequest
func ProviderCommandRequestsForWorker ¶
func ProviderCommandRequestsForWorker(runner *testutil.ProviderCommandRunner, workerType string) []workers.CommandRequest
func ProviderErrorCorpusEntry ¶
func ProviderErrorCorpusEntry(t *testing.T, name string) workerprovider.ProviderErrorCorpusEntry
func RejectedProviderResponse ¶
func RejectedProviderResponse(content string) interfaces.InferenceResponse
func ResolvedRuntimePath ¶
func ScaffoldFactoryFromExamplePNG ¶ added in v0.0.5
func SetWorkingDirectory ¶
func SkipLongFunctional ¶
func StringPointerValue ¶
func UpdateFactoryConfig ¶
func WithWorkingDirectory ¶
func WriteAgentConfig ¶
func WriteWorkRequestFile ¶
func WriteWorkRequestFile(t *testing.T, path string, request interfaces.SubmitRequest)
func WriteWorkstationConfig ¶
Types ¶
type FunctionalAPIServer ¶ added in v0.0.4
type FunctionalAPIServer struct {
// contains filtered or unexported fields
}
func StartFunctionalAPIServer ¶ added in v0.0.4
func StartFunctionalAPIServer(t *testing.T, cfg FunctionalAPIServerConfig) *FunctionalAPIServer
func (*FunctionalAPIServer) Done ¶ added in v0.0.4
func (fs *FunctionalAPIServer) Done() <-chan struct{}
func (*FunctionalAPIServer) GetEngineStateSnapshot ¶ added in v0.0.4
func (fs *FunctionalAPIServer) GetEngineStateSnapshot(t *testing.T) *interfaces.EngineStateSnapshot[petri.MarkingSnapshot, *state.Net]
func (*FunctionalAPIServer) GetFactoryEvents ¶ added in v0.0.4
func (fs *FunctionalAPIServer) GetFactoryEvents(t *testing.T) []factoryapi.FactoryEvent
func (*FunctionalAPIServer) Stop ¶ added in v0.0.4
func (fs *FunctionalAPIServer) Stop(t *testing.T)
func (*FunctionalAPIServer) URL ¶ added in v0.0.4
func (fs *FunctionalAPIServer) URL() string
type FunctionalAPIServerConfig ¶ added in v0.0.4
type FunctionalAPIServerConfig struct {
FactoryDir string
UseMockWorkers bool
WaitForServiceModeRuntime bool
Configure func(*service.FactoryServiceConfig)
ExtraOptions []factory.FactoryOption
CaptureAPISurface func(apisurface.APISurface)
CaptureService func(*service.FactoryService)
CaptureHTTPServer func(*httptest.Server)
CaptureShutdown func(context.CancelFunc, <-chan struct{})
}
type RecordingCommandRunner ¶
type RecordingCommandRunner struct {
// contains filtered or unexported fields
}
func NewRecordingCommandRunner ¶
func NewRecordingCommandRunner(stdout string) *RecordingCommandRunner
func (*RecordingCommandRunner) CallCount ¶
func (r *RecordingCommandRunner) CallCount() int
func (*RecordingCommandRunner) LastRequest ¶
func (r *RecordingCommandRunner) LastRequest() workers.CommandRequest
func (*RecordingCommandRunner) Run ¶
func (r *RecordingCommandRunner) Run(_ context.Context, req workers.CommandRequest) (workers.CommandResult, error)
type TokenIdentitySet ¶
func DeriveTokenIdentities ¶
func DeriveTokenIdentities( consumedTokens []interfaces.Token, outputMutations []interfaces.TokenMutationRecord, ) TokenIdentitySet
Click to show internal directories.
Click to hide internal directories.