Skip to content

Architecture Guide

Anand Gaitonde edited this page Oct 1, 2018 · 28 revisions

Page under construction.

CF CLI Architecture Diagram

<iframe width="640" height="360" src="https://realtimeboard.com/app/embed/o9J_kzabeoE=/?" frameborder="0" scrolling="no" allowfullscreen></iframe>

Need to fill in the following

  • V6 vs V7
  • Legacy vs Rewrite

The CLI is divided into a few major components, including but not limited to:

  1. command
  2. actor
  3. API

command

The command package is the gateway to each CLI command accessible to the CLI, using the actors to talk to the API. Each command on the CLI has 1 corresponding file in the command package. The command package is also responsible for displaying the UI.

actor

The actor package consists of one actor that handles all the logic to process the commands in the CLI. Actor functions are shared workflows that can be used by more than one command. The functions may call upon several API calls to implement their business logic.

API

The API package handles the HTTP requests to the API. The functions in this package return a resource that the actor can then parse and handle. The structures returned by this package closely resemble the return bodies of the Cloud Controller API.