Class ServiceModule

java.lang.Object
io.quarkus.hibernate.reactive.panache.PanacheEntityBase
ai.pipestream.registration.entity.ServiceModule

@Entity public class ServiceModule extends io.quarkus.hibernate.reactive.panache.PanacheEntityBase
Entity representing a registered service module in the system. This is the system of record for all service registrations.
  • Field Details

  • Constructor Details

    • ServiceModule

      public ServiceModule()
  • Method Details

    • create

      public static ServiceModule create(String serviceName, String host, int port)
      Creates a new ServiceModule instance.
      Parameters:
      serviceName - the name of the service
      host - the host address
      port - the port number
      Returns:
      the created ServiceModule
    • generateServiceId

      public static String generateServiceId(String serviceName, String host, int port)
      Generates a unique service ID.
      Parameters:
      serviceName - the name of the service
      host - the host address
      port - the port number
      Returns:
      the generated service ID
    • updateHeartbeat

      public void updateHeartbeat()
      Updates the last heartbeat timestamp.
    • isHealthy

      public boolean isHealthy()
      Checks if the service is healthy based on heartbeat.
      Returns:
      true if healthy, false otherwise