Skip to content

Architecture Guide

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

Page under construction.

CF CLI Architecture Diagram

The CF CLI master branch contains both the V6 and V7 CLIs:

CLI Architecture

Glossary:

  • main.go (Orange): Entry point into the CF CLI.
  • Command Lists (Grey): List of CLI commands contained in that version of the CF CLI. This is dependent on the build tags provided to GoLang at compile time.
  • Command Packages (Yellow): These packages manage the UX/UI logic for each individual command.
  • Actor Packages (Teal): These packages manage the business logic for the entire CLI. The V6 CLI actors are divided by Cloud Controller API version; the push and V2/V3 actors are required to mitigate the complexity of integrating the V2 and V3 API versions. The V7 CLI utilizes the V7 Actor package for V7 specific commands.
  • API Packages (Green): These packages manage the API requests made to the Cloud Controller/UAA/Networking/etc. These API requests do not contain any business logic; they are simple abstractions of individual API requests.

General Command Flow

When a CLI command runs, the following process occurs to execute the provided command:

  1. parse in goflags

V7 Exclusive Packages/Files

Outside of the command/common package (which uses GoLang Build tags), the V7 CLI uses all the V6 packages with the addition of actor/v3action and command/v7:

├── actor
│   └── v7actor
└── command
    ├── common
    │   ├── command_list_v7.go # Different Command list
    │   └── internal
    │       ├── help_all_display_v7.go # Different help list
    │       └── help_common_display_v7.go # Different help list
    └── v7 # Over written V7 versions of V6 commands

Need to fill in the following

  • V6 vs V7
  • Legacy vs Rewrite
Clone this wiki locally