Packages

abstract class HostApp[AppParams] extends PreludeBuilders with prelude.external.IOLogging

An application hosting at least one server node.

By default:

  • initial state defined by configuration file or command line arguments
  • all service fragments under glngn.server.services are enabled
  • dynamic service instantiation of service fragments
  • operations interfaces for all instantiated services
  • ad-hoc definition of singleton services and operations by operators

See also DefaultHostApp.

The type NoAppParams is suitable if no additional application parameters are required.

Known Subclasses
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. HostApp
  2. IOLogging
  3. PreludeBuilders
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HostApp()(implicit arg0: Parser[AppParams], arg1: Help[AppParams])

Type Members

  1. type BaseEnvironment = Clock with Console with System with Random with Blocking

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def clusteredHostCommand(deploymentConfig: DeploymentConfig, hostParams: Params, appParams: AppParams, hostCommand: HostCommand): HostUIO[Int]

  7. def clusteredNodeCommandHandler(hostParams: Params, appParams: AppParams, config: Config, impureBindings: ImpureBindings, hostCommand: HostCommand): HostTask[Int]

  8. def clusteredRunUntilTerm(appParams: AppParams): ServerIO[node.Error, node.TermReason]

    Does not complete until this cluster node completes.

    Does not complete until this cluster node completes. Returns cause of termination. Error occurs if the server is unable to start.

  9. val deploymentImpureBindings: ImpureBindings

    Impure injectable values for this deployment.

    Impure injectable values for this deployment. Defaults to ImpureBindings.empty.

  10. def deploymentName: DeploymentName

    Name of this deployment.

    Name of this deployment. Defaults to "glngn-server".

    This is used as the akka system name and is echoed to logs and other status channels (EG: /healthz).

  11. def deploymentPrelude: Prelude

    The prelude (Prelude) included in this deployment.

    The prelude (Prelude) included in this deployment. Defaults to Prelude.empty.

  12. def dispatchOnArgs(args: List[String]): prelude.external.ZIO[BaseEnvironment, Nothing, Int]

    Given a list of arguments and a HostCommandHandler either return a program for assisting with usage that exits immediately or dispatches to onHostCommand.

    Given a list of arguments and a HostCommandHandler either return a program for assisting with usage that exits immediately or dispatches to onHostCommand.

    Specifically, this is one of:

    0. on no args provided: a program that reports the error and exits with status code 1.

    1. on failure to parse param args a program that reports the error and exits with status code 1.
    2. on failure to parse a command a program that reports the error and exits with status code 1. 2. on usage or help request a program that provides the requested output and exits with status code 0. 3. on command the parsed command and params are provided to onHostCommand.
  13. def dispatchOnCommandParse(hostParams: Params, appParams: AppParams, commandName: String, isCommandUsage: Boolean, isCommandHelp: Boolean, maybeHostCommand: Either[caseapp.core.Error, HostCommand]): prelude.external.ZIO[BaseEnvironment, Nothing, Int]

  14. val empty: Prelude
    Definition Classes
    PreludeBuilders
  15. def enableGroup(groupId: GroupId, entry: Enable): Prelude
    Definition Classes
    PreludeBuilders
  16. def enableGroup(groupId: GroupId, groupName: Option[GroupName], operators: Option[Set[Identity]]): Prelude
    Definition Classes
    PreludeBuilders
  17. def enableGroup(groupId: GroupId, groupName: GroupName, operators: Set[Identity]): Prelude
    Definition Classes
    PreludeBuilders
  18. def enableGroup(groupId: GroupId, operators: Set[Identity]): Prelude
    Definition Classes
    PreludeBuilders
  19. def enableGroup(groupId: GroupId, groupName: GroupName): Prelude
    Definition Classes
    PreludeBuilders
  20. def enableGroup(groupId: GroupId): Prelude
    Definition Classes
    PreludeBuilders
  21. def enableService(groupId: GroupId, serviceId: ServiceId, logicalServiceId: LogicalServiceId): Prelude
    Definition Classes
    PreludeBuilders
  22. def enableService(groupId: GroupId, serviceId: ServiceId, serviceFragment: ServiceFragment): Prelude
    Definition Classes
    PreludeBuilders
  23. def enableService(logicalServiceId: LogicalServiceId, serviceFragment: ServiceFragment): Prelude
    Definition Classes
    PreludeBuilders
  24. def enableService(serviceFragment: ServiceFragment): Prelude
    Definition Classes
    PreludeBuilders
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  27. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  30. lazy val impureLogger: prelude.external.Logger

    Attributes
    protected
    Definition Classes
    IOLogging
  31. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  32. final def main(args: Array[String]): Unit

    See run.

  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. def printClusteredConfigThenExit: ServerTask[Int]

    Print the clustered mode config then exit.

  37. def printCommandHelp(commandName: String): prelude.external.ZIO[BaseEnvironment, Nothing, Int]

  38. def printCommandUsage(commandName: String): prelude.external.ZIO[BaseEnvironment, Nothing, Int]

  39. def printConfigThenExit(config: Config): prelude.external.Task[Int]

    Print the config then exit.

  40. def printFullClusteredConfigThenExit: ServerTask[Int]

    Print the full clustered mode config then exit.

  41. def printFullConfigThenExit(config: Config): prelude.external.Task[Int]

  42. def printHelpThenExit: prelude.external.ZIO[BaseEnvironment, Nothing, Int]

  43. def printUsageThenExit: prelude.external.ZIO[BaseEnvironment, Nothing, Int]

  44. def printVersionThenExit: prelude.external.Task[Int]

    Print glngn server and deployment version.

    Print glngn server and deployment version.

    To do

    Currently only displays "HEAD" for both.

  45. def resolveConfig(deploymentConfig: DeploymentConfig, hostParams: Params, appParams: AppParams): HostTask[Config]

  46. def resolveDeploymentConfig(name: DeploymentName, appParams: AppParams): HostTask[DeploymentConfig]

    Given a name of the deployment and application specific parameters, resolve the configuration of this deployment.

    Given a name of the deployment and application specific parameters, resolve the configuration of this deployment.

    By default

    • the application specific parameters are ignored
    • standalone unless the environment is Kubernetes
    • slow start if the environment is Kubernetes
  47. def resolveDeploymentConfig(appParams: AppParams): HostTask[DeploymentConfig]

    Given the application parameters resolve the deployment configuration.

    Given the application parameters resolve the deployment configuration.

    Defaults to providing exactly the name deploymentName to resolveDeploymentConfig. Override, for example, to define the deployment name from AppParams.

  48. def resolveImpureBindings(deploymentConfig: DeploymentConfig, appParams: AppParams): HostTask[ImpureBindings]

    Given the application parameters resolve the effect bindings for this deployment.

    Given the application parameters resolve the effect bindings for this deployment.

    Default is:

    Task {
      deploymentImpureBindings
    }
  49. def resolvePrelude(deploymentConfig: DeploymentConfig, appParams: AppParams): HostTask[Prelude]

    Given the deployment and application parameters, resolve the prelude for this deployment.

    Given the deployment and application parameters, resolve the prelude for this deployment.

    This is, by default, HostApp$.standardPrelude plus deploymentPrelude.

  50. def run(args: List[String]): prelude.external.ZIO[BaseEnvironment, Nothing, Int]

    Given application arguments as a list of strings (EG: executable args provided to main).

    Given application arguments as a list of strings (EG: executable args provided to main). Provide a host that, when run, will complete once the hosted server node(s). The exit code will only be 0 if all server nodes stop in time without failing.

    See also ExitCodes.

    Default implementation:

    dispatchOnArgs(args)
  51. def runUntilExit[R <: Logging](app: prelude.external.ZIO[R, Error, TermReason]): prelude.external.ZIO[R, Nothing, Int]

    Does not complete until the server completes.

    Does not complete until the server completes. Returns process exit code. An exit code of 0 indicates the server completed due to a normal event. An exit code of non-0 indicates an unrecoverable error occurred.

  52. def setGroupName(groupId: GroupId, groupName: GroupName): Prelude
    Definition Classes
    PreludeBuilders
  53. def standaloneHostCommand(deploymentConfig: DeploymentConfig, hostParams: Params, appParams: AppParams, hostCommand: HostCommand): HostUIO[Int]

  54. def standaloneRunUntilTerm(deploymentConfig: DeploymentConfig, appParams: AppParams, stateDir: prelude.external.Path, options: Run): Host[TermReason]

  55. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  56. def toString(): String
    Definition Classes
    AnyRef → Any
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  60. object logger

    Definition Classes
    IOLogging

Inherited from PreludeBuilders

Inherited from AnyRef

Inherited from Any

Domain

Service Logic

Implementation Detail

Ungrouped