Package com.google.genkit
Class RuntimeFileWriter
java.lang.Object
com.google.genkit.RuntimeFileWriter
RuntimeFileWriter writes runtime discovery files for the Genkit Dev UI.
The Dev UI discovers running Genkit instances by looking for JSON files in
the .genkit/runtimes directory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanup()Cleans up the runtime file using the current directory as project root.static voidremoveRuntimeFile(String projectRoot) Removes the runtime file.static voidWrites a runtime file for Dev UI discovery.static voidwriteRuntimeFile(int port, String projectRoot, String runtimeId) Writes a runtime file for Dev UI discovery.
-
Constructor Details
-
RuntimeFileWriter
public RuntimeFileWriter()
-
-
Method Details
-
write
Writes a runtime file for Dev UI discovery. Uses findProjectRoot() to locate the project root by searching up for pom.xml.- Parameters:
port- the reflection server portruntimeId- the runtime ID from the reflection server
-
writeRuntimeFile
Writes a runtime file for Dev UI discovery.- Parameters:
port- the reflection server portprojectRoot- the project root directoryruntimeId- the runtime ID
-
cleanup
public static void cleanup()Cleans up the runtime file using the current directory as project root. -
removeRuntimeFile
Removes the runtime file.- Parameters:
projectRoot- the project root directory
-