NelsonK[U] provides us with a context that accepts a configuration and gives us a scalaz Task[U] NelsonFK[F[_[_], _], U] provides a context that accepts a configuration and gives us an F[Task, U] this gives us the flexibility of defining a monadic function that yields scalaz streams of Task and U as emitted values (e.g.
NelsonK[U] provides us with a context that accepts a configuration and gives us a scalaz Task[U] NelsonFK[F[_[_], _], U] provides a context that accepts a configuration and gives us an F[Task, U] this gives us the flexibility of defining a monadic function that yields scalaz streams of Task and U as emitted values (e.g. Process[Task, U], Sink[Task, U])
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.
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.
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)
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.
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.
Remove the webhook from the repository.
Deprecates all deloyments for a service / feature version accross all datacenters and namepaces
Expires all deloyments for a service accross all datacenters and namepaces
Fetch a specific datacenter based on its name, along with the namespaces that are avalible in that specific datacenter (if any).
Given a deployment GUID, list the deployment statuses
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.
Given the ID of a particular release, show the release information and any associated deployments
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
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.
Invoked when the inbound webhook from Github arrives, notifying Nelson that a new deployment needs to take place.
a simple lift operation for easy construction of a NelsonFK
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.
List all the datacenters Nelson is currently aware of, and return the namespaces associated with that datacenter.
Like listDeploymentsWithDeprecatedDependencies but for a single Datacenter
Lists all deployments accross datacenters and namspaces that depend on a deployment that is deprecated.
list recent releases, regardless of repository.
list releases this repository has had.
list releases this repository has had. Feels a little hack to be doing the jiggery pokery with ==>> but whatever, its better than using Map.
Fetches statistics about what happened over the last N days, where
N
is defined by the whence
instance of java.time.Instant
.
Given a session, sync up the users repositories to nelson to make sure we have the latest set of repos and their associated access.