# Service Registry and Deployment
#
# Hybrid pattern: defaults + makers + instances

let contracts_lib = import "./contracts.ncl" in
let defaults_lib = import "./defaults.ncl" in

{
  defaults = defaults_lib,

  # Maker functions (not exported)
  make_service_registry | not_exported = fun overrides =>
    defaults_lib.ServiceRegistry & overrides,

  make_service_definition | not_exported = fun overrides =>
    defaults_lib.ServiceDefinition & overrides,

  make_service_deployment | not_exported = fun overrides =>
    defaults_lib.ServiceDeployment & overrides,

  make_binary_deployment | not_exported = fun overrides =>
    defaults_lib.BinaryDeployment & overrides,

  make_docker_deployment | not_exported = fun overrides =>
    defaults_lib.DockerDeployment & overrides,

  make_docker_compose_deployment | not_exported = fun overrides =>
    defaults_lib.DockerComposeDeployment & overrides,

  make_kubernetes_deployment | not_exported = fun overrides =>
    defaults_lib.KubernetesDeployment & overrides,

  make_helm_chart | not_exported = fun overrides =>
    defaults_lib.HelmChart & overrides,

  make_remote_deployment | not_exported = fun overrides =>
    defaults_lib.RemoteDeployment & overrides,

  make_health_check | not_exported = fun overrides =>
    defaults_lib.HealthCheck & overrides,

  make_http_health_check | not_exported = fun overrides =>
    defaults_lib.HttpHealthCheck & overrides,

  make_tcp_health_check | not_exported = fun overrides =>
    defaults_lib.TcpHealthCheck & overrides,

  make_command_health_check | not_exported = fun overrides =>
    defaults_lib.CommandHealthCheck & overrides,

  make_file_health_check | not_exported = fun overrides =>
    defaults_lib.FileHealthCheck & overrides,

  make_startup_config | not_exported = fun overrides =>
    defaults_lib.StartupConfig & overrides,

  make_resource_limits | not_exported = fun overrides =>
    defaults_lib.ResourceLimits & overrides,

  make_service_state | not_exported = fun overrides =>
    defaults_lib.ServiceState & overrides,

  make_service_operation | not_exported = fun overrides =>
    defaults_lib.ServiceOperation & overrides,

  # Default instances
  DefaultServiceRegistry = defaults_lib.ServiceRegistry,
  DefaultServiceDefinition = defaults_lib.ServiceDefinition,
  DefaultServiceDeployment = defaults_lib.ServiceDeployment,
  DefaultBinaryDeployment = defaults_lib.BinaryDeployment,
  DefaultDockerDeployment = defaults_lib.DockerDeployment,
  DefaultDockerComposeDeployment = defaults_lib.DockerComposeDeployment,
  DefaultKubernetesDeployment = defaults_lib.KubernetesDeployment,
  DefaultHelmChart = defaults_lib.HelmChart,
  DefaultRemoteDeployment = defaults_lib.RemoteDeployment,
  DefaultHealthCheck = defaults_lib.HealthCheck,
  DefaultHttpHealthCheck = defaults_lib.HttpHealthCheck,
  DefaultTcpHealthCheck = defaults_lib.TcpHealthCheck,
  DefaultCommandHealthCheck = defaults_lib.CommandHealthCheck,
  DefaultFileHealthCheck = defaults_lib.FileHealthCheck,
  DefaultStartupConfig = defaults_lib.StartupConfig,
  DefaultResourceLimits = defaults_lib.ResourceLimits,
  DefaultServiceState = defaults_lib.ServiceState,
  DefaultServiceOperation = defaults_lib.ServiceOperation,
}
