Packages

o

nelson

Nelson

object Nelson

Source
Nelson.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Nelson
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class CommitUnit(unitName: UnitName, version: Version, target: NamespaceName) extends Product with Serializable
  2. final case class LoadbalancerSummary(namespace: Namespace, loadbalancer: LoadbalancerDeployment, outboundDependencies: Vector[RoutingNode]) extends Product with Serializable
  3. type NelsonFK[F[_[_], _], U] = Kleisli[[β$0$]F[IO, β$0$], NelsonConfig, U]
  4. type NelsonK[U] = Kleisli[IO, NelsonConfig, U]

    NelsonK[U] provides us with a context that accepts a configuration and gives us a cats IO[U] NelsonFK[F[_[_], _], U] provides a context that accepts a configuration and gives us an F[IO, U] this gives us the flexibility of defining a monadic function that yields FS2 streams of IO and U as emitted values (e.g.

    NelsonK[U] provides us with a context that accepts a configuration and gives us a cats IO[U] NelsonFK[F[_[_], _], U] provides a context that accepts a configuration and gives us an F[IO, U] this gives us the flexibility of defining a monadic function that yields FS2 streams of IO and U as emitted values (e.g. Stream[IO, U], Sink[IO, U])

  5. final case class RecentStatistics(statusCounts: List[(String, Int)], mostDeployed: List[(String, Int)], leastDeployed: List[(String, Int)]) extends Product with Serializable
  6. final case class RuntimeSummary(deployment: DeploymentSummary, health: List[HealthStatus], currentStatus: DeploymentStatus, expiresAt: Instant) extends Product with Serializable
  7. final case class StackSummary(namespace: Namespace, deployment: Deployment, statuses: List[(DeploymentStatus, Option[String], Instant)], expiration: Instant, inboundDependencies: Vector[(RoutePath, RoutingNode)], outboundDependencies: Vector[(RoutePath, RoutingNode)]) extends Product with Serializable

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def commit(un: UnitName, v: Version, ns: NamespaceName): NelsonK[Unit]
  7. def commit(un: UnitName, ns: NamespaceName, dcs: List[Datacenter], m: @@[Manifest, Versioned]): NelsonK[Unit]
  8. def commitLoadbalancer(name: String, v: Int, dcName: DatacenterRef, ns: NamespaceName): NelsonK[Unit]
  9. val config: NelsonK[NelsonConfig]
    Attributes
    protected
  10. def createBlueprint(name: String, description: Option[String], sha: Sha256, template: String): NelsonK[Option[Blueprint]]
  11. def createDatacenters(list: List[Datacenter]): NelsonK[Unit]

    This is a bootstrapping function - definitions of datacenters come from the Nelson configuration, and the database is a read-only reference of that, simply so we can provide forigen key constraints when doing queries.

    This is a bootstrapping function - definitions of datacenters come from the Nelson configuration, and the database is a read-only reference of that, simply so we can provide forigen key constraints when doing queries.

    This function should only ever be called at bootup.

  12. def createDefaultNamespaceIfAbsent(dcs: List[Datacenter], ns: NamespaceName): NelsonK[Unit]
  13. def createHook(session: Session, slug: Slug): NelsonK[Repo]

    Actually setup the webhook both in the nelson database, and also on the remote github repository.

    Actually setup the webhook both in the nelson database, and also on the remote github repository. The user must have admin privileges on the repo for this to successfully work.

  14. def createManualDeployment(s: Session, m: ManualDeployment): NelsonK[GUID]

    Create a manual deployment.

    Create a manual deployment. That is to say, let Nelson know about something that was not deployed via Nelson (e.g. databases and other ops-infrastructure)

  15. def createSessionFromGithubToken(githubToken: AccessToken): NelsonK[Session]

    Given a users Github personal access token - obtained either directly by user input, or via the OAtuh web flow - and lift it into a Github session.

    Given a users Github personal access token - obtained either directly by user input, or via the OAtuh web flow - and lift it into a Github session. This function is distinct from createSessionFromOAuthCode because we require a way for non-web clients to obtain a token they can use when calling the Nelson API programatically.

  16. def createSessionFromOAuthCode(code: TempoaryAccessCode): NelsonK[Session]

    Create a Nelson session based on the web-flow Github provides.

    Create a Nelson session based on the web-flow Github provides. The AccessToken is an opaque, one-time code used to obtain the github token for the user who is currently logged in. This function will only ever work in an OAuth web-flow, as TempoaryAccessCode tokens cannot be obtained apiori or out of band.

  17. def deleteHook(session: Session, slug: Slug): NelsonK[Unit]

    Remove the webhook from the repository.

  18. def deleteLoadbalancerDeployment(guid: GUID): NelsonK[Unit]
  19. def deploy(actions: List[Action]): NelsonK[Unit]
  20. def deprecateService(sn: ServiceName): NelsonK[Unit]

    Deprecates all deloyments for a service / feature version accross all datacenters and namepaces

  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. def expireService(sn: ServiceName): NelsonK[Unit]

    Expires all deloyments for a service accross all datacenters and namepaces

  24. def fetchBlueprint(name: String, revision: Revision): NelsonK[Option[Blueprint]]
  25. def fetchDatacenterByName(name: String): NelsonK[Option[(Datacenter, Set[Namespace])]]

    Fetch a specific datacenter based on its name, along with the namespaces that are avalible in that specific datacenter (if any).

  26. def fetchDeployment(guid: GUID): NelsonK[Option[StackSummary]]
  27. def fetchDeploymentStatuses(guid: GUID): NelsonK[List[(DeploymentStatus, Option[String], Instant)]]

    Given a deployment GUID, list the deployment statuses

  28. def fetchLoadbalancerDeployment(guid: GUID): NelsonK[Option[LoadbalancerSummary]]
  29. def fetchRawRepoManifest(token: AccessToken)(slug: Slug, ref: Reference = Github.Branch("master")): NelsonK[String]
  30. def fetchRepoManifestAndValidateDeployable(slug: Slug, ref: Reference = Github.Branch("master")): NelsonK[ValidatedNel[NelsonError, Manifest]]

    Actually reach out to the repository in question using the github content API and fetch the manifest file, if it exists.

    Actually reach out to the repository in question using the github content API and fetch the manifest file, if it exists.

    This function ensures that the file exists, that its content can be loaded into a Manifest instance, and validates that it cab be deployed

    Anything else is just not cricket.

  31. def fetchWorkflowLog(guid: GUID, offset: Int): NelsonK[Option[(Int, List[String])]]
  32. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. def findDeploymentExpiration(guid: GUID): NelsonK[Option[Instant]]
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def getDeploymentsByDatacenter(dc: Datacenter, f: (Namespace) ⇒ StoreOpF[List[Deployment]]): StoreOpF[Set[Deployment]]
  36. def getLoadbalancerByGUID(guid: GUID): NelsonK[Option[LoadbalancerDeployment]]
  37. def getOrCreateNamespace(dc: DatacenterRef, ns: NamespaceName): StoreOpF[ID]
  38. def getRelease(id: Long): NelsonK[SortedMap[Released, List[ReleasedDeployment]]]

    Given the ID of a particular release, show the release information and any associated deployments

  39. def getRoutingGraphs(dc: DatacenterRef, ns: List[NamespaceName]): NelsonK[List[(Namespace, RoutingGraph)]]

    Gets routing graphs for a given datacenter and list of namespaces.

    Gets routing graphs for a given datacenter and list of namespaces. If namespaces is not provided then default to all namespaces

  40. def getRuntimeSummary(guid: GUID): NelsonK[Option[RuntimeSummary]]
  41. def getStatusOfReleaseUnit(s: Slug, u: UnitName): NelsonK[Option[DeploymentStatus]]

    Given a repo slug and a specific unit, figure out what the state of the latest released version is, for the specified unit only.

    Given a repo slug and a specific unit, figure out what the state of the latest released version is, for the specified unit only. This is primarily used to power the SVG badging.

    TIM: REALLY NEEDS CACHING TO SCALE; *PROBALLY* TOO EXPENSIVE RIGHT NOW.

  42. def getVersionedManifestForRelease(r: Released): NelsonK[@@[Manifest, Versioned]]
  43. def handleDeployment(e: DeploymentEvent): NelsonK[Unit]

    Invoked when the inbound webhook from Github arrives, notifying Nelson that a new deployment needs to take place.

  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  45. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  46. def lift[F[_[_], _], U](f: (NelsonConfig) ⇒ F[IO, U]): Kleisli[[β$1$]F[IO, β$1$], NelsonConfig, U]

    a simple lift operation for easy construction of a NelsonFK

  47. def listAuditEvents(limit: Long, offset: Long, releaseId: Option[Long], action: Option[String], category: Option[String]): NelsonK[List[AuditLog]]
  48. def listBlueprints: NelsonK[List[Blueprint]]
  49. def listDatacenterDeployments(dcName: String, ns: NonEmptyList[NamespaceName], status: NonEmptyList[DeploymentStatus], unit: Option[UnitName]): NelsonK[List[(Namespace, Deployment, DeploymentStatus)]]

    Given a specific datacenter and a list of namespaces figure out deployments by DeploymentStatus.

    Given a specific datacenter and a list of namespaces figure out deployments by DeploymentStatus. TIM: this probally wont scale, but its likley ok for the moment.

  50. def listDatacenterUnitsByStatus(dc: String, ns: NonEmptyList[NamespaceName], status: NonEmptyList[DeploymentStatus]): NelsonK[List[(Namespace, GUID, ServiceName)]]
  51. def listDatacenters(implicit ec: ExecutionContext): NelsonK[Map[Datacenter, Set[Namespace]]]

    List all the datacenters Nelson is currently aware of, and return the namespaces associated with that datacenter.

  52. def listDeployments(dcs: List[String], ns: NonEmptyList[NamespaceName], status: NonEmptyList[DeploymentStatus], unit: Option[UnitName]): NelsonK[List[(DatacenterRef, Namespace, Deployment, DeploymentStatus)]]
  53. def listDeploymentsWithDeprecatedDependencies(dc: Datacenter): NelsonK[Vector[DependencyEdge]]

    Like listDeploymentsWithDeprecatedDependencies but for a single Datacenter

  54. def listDeploymentsWithDeprecatedDependencies: NelsonK[Vector[DependencyEdge]]

    Lists all deployments accross datacenters and namspaces that depend on a deployment that is deprecated.

  55. def listLoadbalancerDeployments(dc: DatacenterRef, ns: NonEmptyList[NamespaceName]): NelsonK[List[(Namespace, LoadbalancerDeployment)]]
  56. def listLoadbalancers(dcs: List[String], ns: NonEmptyList[NamespaceName]): NelsonK[List[(DatacenterRef, Namespace, LoadbalancerDeployment)]]
  57. def listReleases(limit: Option[Int]): NelsonK[SortedMap[Released, List[ReleasedDeployment]]]

    list recent releases, regardless of repository.

  58. def listRepositories(session: Session, owner: Option[String]): NelsonK[List[Repo]]
    Annotations
    @SuppressWarnings()
  59. def listRepositoryReleases(s: Slug): NelsonK[SortedMap[Released, List[ReleasedDeployment]]]

    list releases this repository has had.

  60. def listUnitsByStatus(dcs: List[DatacenterRef], ns: NonEmptyList[NamespaceName], status: NonEmptyList[DeploymentStatus]): NelsonK[List[(DatacenterRef, Namespace, GUID, ServiceName)]]
  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  63. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  64. def proofBlueprint(templateContent: String): NelsonK[String]
  65. def recentActivityStatistics: NelsonK[RecentStatistics]

    Fetches statistics about what happened over the last N days, where N is defined by the whence instance of java.time.Instant.

  66. def recursiveCreateNamespace(dc: DatacenterRef, ns: NamespaceName): NelsonK[Unit]
  67. def recursiveCreateSubordinateNamespace(dc: DatacenterRef, ns: NamespaceName): NelsonK[Unit]
  68. def redeploy(deploymentGuid: GUID): NelsonK[Unit]
  69. def reverseTrafficShift(guid: GUID): NelsonK[TrafficShift]
  70. def storeManifest(m: @@[Manifest, Versioned], repoId: ID): NelsonK[Unit]
  71. def syncRepos(session: Session): NelsonK[Unit]

    Given a session, sync up the users repositories to nelson to make sure we have the latest set of repos and their associated access.

  72. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  73. def toString(): String
    Definition Classes
    AnyRef → Any
  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped