Packages

p

nelson

package nelson

Source
package.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. type @@[T, Tag] = AnyRef { ... /* 2 definitions in type refinement */ }
  2. abstract class Accepts extends AnyRef

    This should be added to http4s

  3. final case class AccessToken(value: String) extends Product with Serializable
  4. trait Actionable[A] extends AnyRef

    An Actionable is something that can be "acted" upon in the context of a datacenter and namespace.

    An Actionable is something that can be "acted" upon in the context of a datacenter and namespace. In Nelson this typically means deploying into a datacenter using a scheduler such as Nomad, or interacting with Aws to launch some infrastructure.

  5. final case class AuditConfig(concurrencyLimit: Int, bufferLimit: Int) extends Product with Serializable
  6. final case class BannedClientsConfig(httpUserAgents: List[HttpUserAgent]) extends Product with Serializable

    Configuration for banning/allowing various clients.

  7. final case class Base64(decoded: String) extends AnyVal with Product with Serializable
  8. implicit class BedazzledIO[A] extends AnyRef
  9. implicit class BedazzledOpt[A] extends AnyRef
  10. implicit class BedazzledString extends AnyRef
  11. type BlueprintRef = (String, Revision)
  12. trait Cache[K, V] extends AnyRef

    Basic cache API providing get/put operations

  13. trait CacheBuilder[K, V] extends AnyRef

    Basic CacheBuilder API for constructing cache instances.

    Basic CacheBuilder API for constructing cache instances. API is subset of what Google's Guava libraries is providing

  14. final case class CacheConfig(stackStatusCache: Cache[(String, String, String), DeploymentStatus]) extends Product with Serializable
  15. final case class CleanupConfig(initialTTL: Duration, extendTTL: Duration, cleanupDelay: FiniteDuration, sweeperDelay: FiniteDuration) extends Product with Serializable
  16. final case class CyclicDependency(message: String) extends NelsonError with Product with Serializable
  17. type DNSName = String
  18. final case class DatabaseConfig(driver: String, connection: String, username: Option[String], password: Option[String], maxConnections: Option[Int]) extends Product with Serializable
  19. final case class Datacenter(name: String, docker: Docker, domain: Domain, defaultTrafficShift: TrafficShift, proxyCredentials: Option[ProxyCredentials], interpreters: Infrastructure.Interpreters, loadbalancer: Option[~>[LoadbalancerOp, IO]], policy: PolicyConfig) extends Product with Serializable
  20. type DatacenterRef = String
  21. type DependencyEdge = (RoutingNode, RoutingNode)
  22. final case class DependencyGraph(gr: RoutingGraph) extends Product with Serializable
  23. final case class DeploymentCommitFailed(reason: String) extends NelsonError with Product with Serializable
  24. type DeploymentHash = String
  25. final case class DeploymentMonitorConfig(delay: FiniteDuration) extends Product with Serializable
  26. sealed abstract class DeploymentStatus extends Product with Serializable
  27. type DeploymentStatusString = String
  28. final case class DeprecatedDependency(unit: String, dc: String, ns: String, dependency: ServiceName) extends NelsonError with Product with Serializable
  29. final case class DockerConfig(connection: String, verifyTLS: Boolean) extends Product with Serializable

    configuration options for the docker cli controller.

  30. type EmailAddress = String
  31. final case class EmailConfig(host: String, port: Int, auth: Authenticator, from: EmailAddress, useSSL: Boolean = true) extends Product with Serializable
  32. final case class ExceededLimitRange(value: Int) extends NelsonError with Product with Serializable
  33. final case class ExpirationPolicyConfig(defaultPeriodic: ExpirationPolicy, defaultNonPeriodic: ExpirationPolicy) extends Product with Serializable
  34. type ExpirationPolicyRef = String
  35. final case class FailedDockerExtraction(err: String) extends NelsonError with Product with Serializable
  36. final case class FailedDockerOperation(err: String) extends NelsonError with Product with Serializable
  37. final case class FailedLoadbalancerDeploy(name: String, reason: String) extends NelsonError with Product with Serializable
  38. final case class FailedWorkflow(name: String, reason: String = "") extends NelsonError with Product with Serializable
  39. final case class FeatureVersion(major: Int, minor: Int) extends Product with Serializable
  40. type GUID = String
  41. final case class GithubConfig(domain: Option[Uri], clientId: String, clientSecret: String, redirectUri: String, scope: String, systemAccessToken: AccessToken, systemUsername: String, organizationBlacklist: List[String], organizationAdminList: List[String]) extends Product with Serializable

  42. class GuavaCache[K, V] extends Cache[K, V]

    ************** Specific Guava based cache implementation *****************

  43. class GuavaCacheBuilder[K, V] extends CacheBuilder[K, V]
  44. final case class Hook(id: Long, isActive: Boolean) extends Product with Serializable

    Represents the webhook added to the Github repository.

  45. type ID = Long
  46. class InstrumentedDockerClient extends ~>[DockerOp, IO]
  47. class InstrumentedNomadClient extends ~>[SchedulerOp, IO]
  48. class InstrumentedVaultClient extends ~>[Vault, IO]
  49. final case class Interpreters(git: ~>[GithubOp, IO], storage: ~>[StoreOp, IO], slack: Option[~>[SlackOp, IO]], email: Option[~>[EmailOp, IO]]) extends Product with Serializable
  50. final case class InvalidDockerImage(name: String) extends NelsonError with Product with Serializable
  51. final case class InvalidGrant(unitName: UnitName, grant: String) extends NelsonError with Product with Serializable
  52. final case class InvalidLoadbalancer(rs: Vector[Route]) extends NelsonError with Product with Serializable
  53. final case class InvalidLoadbalancerNameLength(name: String, max: Int) extends NelsonError with Product with Serializable
  54. final case class InvalidLoadbalancerPort(port: Int, allowed: List[Int]) extends NelsonError with Product with Serializable
  55. final case class InvalidNamespaceName(name: String) extends NelsonError with Product with Serializable
  56. final case class InvalidPrometheusRules(msg: String) extends NelsonError with Product with Serializable
  57. final case class InvalidRepoAccess(s: String) extends NelsonError with Product with Serializable
  58. final case class InvalidRouteDefinition(name: String) extends NelsonError with Product with Serializable
  59. final case class InvalidSlug(s: String) extends NelsonError with Product with Serializable
  60. final case class InvalidTrafficShiftReverse(reason: String) extends NelsonError with Product with Serializable
  61. final case class InvalidUnitNameChars(name: String) extends NelsonError with Product with Serializable
  62. final case class InvalidUnitNameLength(name: String) extends NelsonError with Product with Serializable
  63. final class Kubectl extends AnyRef
  64. final case class LoadbalancerNotFound(guid: GUID) extends NelsonError with Product with Serializable
  65. type LoadbalancerRef = String
  66. final case class MajorVersion(major: Int) extends Product with Serializable
  67. final case class Manifest(units: List[UnitDef], plans: List[Plan], loadbalancers: List[Loadbalancer], namespaces: List[Namespace], targets: DeploymentTarget, notifications: NotificationSubscriptions) extends Product with Serializable
  68. final case class ManifestConfig(filename: String) extends Product with Serializable
  69. final case class ManifestUnitKindMismatch(unitKind: String, unitNames: List[String]) extends NelsonError with Product with Serializable
  70. final case class ManualDeployFailed(reason: String) extends NelsonError with Product with Serializable
  71. class Metrics extends AnyRef
  72. final case class MisconfiguredDatacenter(name: String, problem: String) extends NelsonError with Product with Serializable
  73. final case class MissingDefaultNamespaceReference(ns: NamespaceName) extends NelsonError with Product with Serializable
  74. final case class MissingDependency(unit: String, dc: String, ns: String, dependency: ServiceName) extends NelsonError with Product with Serializable
  75. final case class MissingDeployment(guid: String) extends NelsonError with Product with Serializable
  76. final case class MissingDeploymentReference(id: Long, slug: Slug) extends NelsonError with Product with Serializable
  77. final case class MissingHealthCheckPath(protocol: String) extends NelsonError with Product with Serializable
  78. final case class MissingIndividualDefaultNamespaceReference(ns: NamespaceName) extends NelsonError with Product with Serializable
  79. final case class MissingReleaseForDeployment(guid: String) extends NelsonError with Product with Serializable
  80. final case class MissingResourceReference(ref: String, p: Plan) extends NelsonError with Product with Serializable
  81. final case class MultipleErrors(errors: NonEmptyList[NelsonError]) extends NelsonError with Product with Serializable
  82. final case class MultipleValidationErrors(errors: NonEmptyList[NelsonError]) extends NelsonError with Product with Serializable
  83. final case class NamespaceCreateFailed(reason: String) extends NelsonError with Product with Serializable
  84. final case class NamespaceName(nel: NonEmptyList[String]) extends Product with Serializable
  85. final case class NelsonConfig(git: GithubConfig, network: NetworkConfig, security: SecurityConfig, database: DatabaseConfig, dockercfg: DockerConfig, nomadcfg: NomadConfig, manifest: ManifestConfig, timeout: Duration, cleanup: CleanupConfig, deploymentMonitor: DeploymentMonitorConfig, datacenters: List[Datacenter], pipeline: PipelineConfig, audit: AuditConfig, template: TemplateConfig, http: Client[IO], pools: Pools, interpreters: Interpreters, workflowLogger: WorkflowLogger, bannedClients: Option[BannedClientsConfig], ui: UIConfig, proxyPortWhitelist: Option[ProxyPortWhitelist], defaultNamespace: NamespaceName, expirationPolicy: ExpirationPolicyConfig, discoveryDelay: FiniteDuration, queue: Queue[IO, Action], auditQueue: Queue[IO, AuditEvent[_]]) extends Product with Serializable

    Global configuration for all the various external inputs that Nelson actually cares about.

  86. abstract class NelsonError extends RuntimeException
  87. final case class NetworkConfig(bindHost: String, bindPort: Int, externalHost: String, externalPort: Int, tls: Boolean, monitoringPort: Int, idleTimeout: Duration) extends Product with Serializable

    specify the settings for the network configuration of nelson: what ports and addresses are bound, versus which are used for remote callers.

  88. final case class NomadConfig(applicationPrefix: Option[String], requiredServiceTags: Option[List[String]]) extends Product with Serializable
  89. final case class Organization(id: Long, _name: Option[String], slug: String, avatar: URI) extends Product with Serializable
  90. final case class PeriodicUnitWithTrafficShift(name: String) extends NelsonError with Product with Serializable
  91. final case class PipelineConfig(concurrencyLimit: Int, bufferLimit: Int) extends Product with Serializable

    controls how the workflow pipeline executes, and what concurrency limits are in place.

  92. type PlanRef = String
  93. final case class PolicyConfig(resourceCredsPath: String, pkiPath: Option[String]) extends Product with Serializable

    Configuration for auto-generated Vault policies

  94. final case class Pools(defaultPool: ExecutorService, serverPool: ExecutorService, schedulingPool: ScheduledExecutorService) extends Product with Serializable
  95. final case class ProblematicDeployable(str: String, url: String) extends NelsonError with Product with Serializable
  96. final case class ProblematicRepoManifest(slug: Slug) extends NelsonError with Product with Serializable
  97. class PrometheusConsul extends ~>[ConsulOp, IO]
  98. final case class ProxyPortWhitelist(ports: List[Int]) extends Product with Serializable
  99. final case class Released(slug: Slug, version: Version, timestamp: Instant, referenceId: Long, releaseHtmlUrl: URI) extends Product with Serializable

    Meant to represent a released version of a unit.

    Meant to represent a released version of a unit. These are fixed in time, and immutable after creation.

  100. final case class ReleasedDeployment(id: Long, unit: DCUnit, namespace: String, hash: String, timestamp: Instant, state: DeploymentStatus, guid: GUID) extends Product with Serializable
  101. type RenderedBlueprint = String
  102. final case class Repo(id: Long, slug: Slug, access: RepoAccess, hook: Option[Hook] = None) extends Product with Serializable
  103. sealed trait RepoAccess extends AnyRef

    Denotes the access aforded to this repository for nelson.

    Denotes the access aforded to this repository for nelson. Avalible options are (in order of access level, descending): - admin - push - pull

  104. final case class RepoNotFound(slug: Slug) extends NelsonError with Product with Serializable
  105. final case class Schedule(interval: Interval) extends Product with Serializable
  106. final case class SecurityConfig(encryptionKeyBase64: String, signingKeyBase64: String, expireLoginAfter: Duration, useEnvironmentSession: Boolean) extends Product with Serializable
  107. final case class Session(expiry: Instant, github: AccessToken, user: User) extends Product with Serializable

    this is the data that we store (encrypted) into the cookie stored on users browsers.

  108. type Sha256 = String
  109. final case class SlackConfig(webhook: Uri, username: String) extends Product with Serializable
  110. final case class Slug(owner: String, repository: String) extends Product with Serializable

    Typed representation of the owner / repo string that is used to canonically reference a repo within nelson.

  111. type StatusMessage = String
  112. type TagName = String
  113. final case class TaskEvent(message: String, driverMessage: String) extends Product with Serializable
  114. final case class TemplateConfig(tempDir: Path, memoryMegabytes: Int, cpuPeriod: Int, cpuQuota: Int, timeout: FiniteDuration, templateEngineImage: String, vaultAddress: Option[String]) extends Product with Serializable
  115. type TempoaryAccessCode = String
  116. sealed trait TrafficShiftPolicy extends AnyRef
  117. final case class UIConfig(enabled: Boolean, filePath: Option[String]) extends Product with Serializable

    Configuration for servicing the user interface

    Configuration for servicing the user interface

    filePath

    Location of the UI static files on the filesystem.

  118. final case class UnexpectedConsulResponse(resp: String) extends NelsonError with Product with Serializable
  119. final case class UnexpectedMissingHook(slug: Slug) extends NelsonError with Product with Serializable
  120. type UnitName = String
  121. type UnitRef = String
  122. final case class UnknownBackendDestination(r: Route, unames: List[String]) extends NelsonError with Product with Serializable
  123. final case class UnknownBlueprintReference(ref: String, revision: Revision) extends NelsonError with Product with Serializable
  124. final case class UnknownDatacenter(name: String) extends NelsonError with Product with Serializable
  125. final case class UnknownNamespace(dcName: String, nsName: String) extends NelsonError with Product with Serializable
  126. final case class UnknownPortRef(ref: String, unit: UnitName) extends NelsonError with Product with Serializable
  127. final case class UnsatisfiedDeploymentRequirements(u: UnitDef) extends NelsonError with Product with Serializable
  128. final case class User(login: String, avatar: URI, name: Option[String], email: Option[String], orgs: List[Organization]) extends Product with Serializable

    represents the current user who's logged into the system.

  129. final case class Version(major: Int, minor: Int, patch: Int) extends Product with Serializable
  130. trait Versionable[A] extends Serializable
  131. final case class VersionedGitTagRequired(ref: Reference) extends NelsonError with Product with Serializable
  132. trait Workflow[O] extends AnyRef

    Workflows must be defined in terms of a particular type of UnitDef they target, and an output of the workflow.

    Workflows must be defined in terms of a particular type of UnitDef they target, and an output of the workflow. By having a workflow specilized to a particular type of unit, we avoid having to have 'uber workflows' that need to handle every possible type of unit, which reduces the implementation complexity of a given workflow quite considerably. In addition, the output type O is intended to provide an opertunity for the workflow to output something more than just effects. For example, a workflow could accumulate a set of logs, or some reporting state - whatever - it doesnt matter.

    Workflows define both setup (deploy) and teardown (detroy) workflow

  133. sealed abstract class WorkflowControlOp[+A] extends AnyRef
  134. final case class WorkflowLoggerConfig(bufferLimit: Int, filePath: Path) extends Product with Serializable
  135. type WorkflowRef = String
  136. abstract class YamlError extends NelsonError
  137. abstract class YamlParser[A] extends AnyRef

Value Members

  1. def featureVersionFrom1or2DotString(versionString: String): Option[FeatureVersion]
  2. def fromJson[A](in: String)(implicit arg0: DecodeJson[A]): IO[A]

    Given we're mostly parsing string results to task, make a simple decoder utility function for it.

  3. def linkTo(resource: String)(network: NetworkConfig): URI

    Whenever one needs to refernce another location on the Nelson service, and we expect it to be referenced by an external caller (e.g.

    Whenever one needs to refernce another location on the Nelson service, and we expect it to be referenced by an external caller (e.g. Github or browser) then we need to use the linkTo function which will generate a valid URL with all the external configuration settings needed for the link to work properly (i.e. accounting for HTTP(S) and such)

  4. def randomAlphaNumeric(desiredLength: Int): String
  5. implicit val versionableLoadbalancer: Versionable[@@[Loadbalancer, Versioned]]
  6. implicit def versionableOps[A](a: A)(implicit arg0: Versionable[A]): AllOps[A]
  7. implicit val versionableUnit: Versionable[@@[UnitDef, Versioned]]
  8. def withTempFile[A](s: String, prefix: String = "nelson-", suffix: String = ".tmp", dir: Path = DefaultTempDir)(f: (File) ⇒ Stream[IO, A]): Stream[IO, A]
  9. object &

    We used to get this from Unfiltered.

    We used to get this from Unfiltered. Put it here until we can get it into http4s.

  10. object AcceptsSvg extends Accepts

    True if a request accepts svg+xml

  11. object Actionable
  12. object AtomicShiftPolicy extends TrafficShiftPolicy
  13. object BannedClientsConfig extends Serializable
  14. object Banner
  15. object Base64 extends Serializable
  16. object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  17. object Cache

    Main public entry point for creating in-memory cache.

    Main public entry point for creating in-memory cache.

    Default cache has no means to remove anything. It keeps entries forever (but they can be overriden)

    Behavior can be customized with following options:

    • limit maximum number of elements to cache once limit is reached older elements will be removed, typically using "last recently used" strategy
    • "ttl since update" for object in cache Prevents from keeping stale objects in the cache
    • "ttl since last use" Prevents from wasting memory on unused objects

    ConcurrencyLevel hint is Guava-specific hint to guide the allowed concurrency among update operations. Default value is 4 (for guava 13.0)

    From Guava docs: Used as a hint for internal sizing. The table is internally partitioned to try to permit the indicated number of concurrent updates without contention. Because assignment of entries to these partitions is not necessarily uniform, the actual concurrency observed may vary. Ideally, you should choose a value to accommodate as many threads as will ever concurrently modify the table. Using a significantly higher value than you need can waste space and time, and a significantly lower value can lead to thread contention. But overestimates and underestimates within an order of magnitude do not usually have much noticeable impact. A value of one permits only one thread to modify the cache at a time, but since read operations and cache loading computations can proceed concurrently, this still yields higher concurrency than full synchronization.

  18. object Canopus extends Workflow[Unit]

    Kubernetes deployment workflow that just deploys and deletes units.

    Kubernetes deployment workflow that just deploys and deletes units. No Vault policy or traffic shifting (yet!).

    This workflow is named after the Canopus star which represents King Menelaus's helmsman in Greek mythology. Canopus is a star in the Carina constellation, which in turn was once part of the Argo constellation, named after the ship used by Jason and the Argonauts.

    The name here is inspired by the existing use of astronomical names (see the Magnetar workflow), "kubernetes" which is Greek for helmsman, and Nelson's usage of the Argonaut library for J(a)SON parsing.

  19. object CatsHelpers
  20. object Config
  21. object CycleDetection
  22. object Datacenter extends Serializable
  23. object DeploymentStatus extends Serializable
  24. object FeatureVersion extends Serializable
  25. object Github
  26. object Http4sConsul
  27. object Infrastructure
  28. object InstrumentedDockerClient extends Serializable
  29. object InstrumentedNomadClient extends Serializable
  30. object InstrumentedVaultClient extends Serializable
  31. object Json
  32. object Kubectl
  33. object LinearShiftPolicy extends TrafficShiftPolicy
  34. object Magnetar extends Workflow[Unit]
  35. object Main
  36. object Manifest extends Serializable
  37. object ManifestValidator
  38. object Metrics
  39. object NamespaceName extends Serializable
  40. object Nelson
  41. object NoTargetDatacenters extends NelsonError with Product with Serializable
  42. object NomadNotImplemented extends NelsonError
  43. object Pipeline
  44. object Pools extends Serializable
  45. object PrometheusConsul extends Serializable
  46. object Pulsar extends Workflow[Unit]

    Kubernetes deployment workflow that deploys and deletes units, whilst provisioning authentication roles in Vault so that Kubernetes pods can talk to Vault at runtime.

  47. object Released extends Serializable
  48. object Repo extends Serializable
  49. object RepoAccess
  50. object Schedule extends Serializable
  51. object Server
  52. object Session extends Serializable
  53. object Slug extends Serializable
  54. object StubbedConsulClient extends ~>[ConsulOp, IO]
  55. object Tag

    Copied, adapted, and minimized from Scalaz's Tag implementation.

    Copied, adapted, and minimized from Scalaz's Tag implementation. https://github.com/scalaz/scalaz/blob/v7.1.17/core/src/main/scala/scalaz/Tag.scala

  56. object Templates
  57. object TrafficShiftPolicy
  58. object UnsatisfiedDeploymentRequirements extends Serializable
  59. object Version extends Serializable
  60. object Versionable extends Serializable
  61. object Workflow
  62. object WorkflowControlOp
  63. object YamlError extends Serializable
  64. object YamlParser
  65. object process

Inherited from AnyRef

Inherited from Any

Ungrouped