github.com/qlik-oss/gopherciser@v0.18.6/architecture.md (about)

     1  # gopherciser code architecture
     2  
     3  Root of the project and main function.
     4  
     5  ## Main packages
     6  
     7  ![Main packages](docs/images/architecture-flowchart.png)
     8  
     9  ### cmd
    10  
    11  Command-line interface for controlling `gopherciser`. The main command is `execute`, which is used to run a test.
    12  
    13  ### config
    14  
    15  Main handler for script files. Parses, validates and executes tests.
    16  
    17  ### connection
    18  
    19  Defines how to authenticate towards an environment. There are currently two major methods, `jwt` and `ws`, which can be used with variations to "self-signed jwt", "header auth", "no auth" etc.
    20  
    21  ### scenario
    22  
    23  Handles registration of existing actions and contains definitions of all default actions. Handles execution and reports results and statistics for all actions.
    24  
    25  ### scheduler
    26  
    27  Defines the extendable scheduler interface. Includes the default "simple" scheduler, which schedules users based on ramp-up and iterations.
    28  
    29  ### users
    30  
    31  Defines the users to simulate. The users can be based on lists or prefix.
    32  
    33  ## Other packages
    34  
    35  ### action
    36  
    37  Handles action states. Used for reporting state, errors and possible extra details for logging.
    38  
    39  ### atomichandlers
    40  
    41  Atomic objects and counters.
    42  
    43  ### buildmetrics
    44  
    45  Handlers for Prometheus data.
    46  
    47  ### creation
    48  
    49  Stub structs used when creating objects. 
    50  
    51  ### structs
    52  
    53  Collection of data structs used by multiple actions.
    54  
    55  ### enigmahandlers
    56  
    57  Handles connections towards the Qlik Associative Engine using the enigma.go library.
    58  
    59  ### enigmainterceptors
    60  
    61  Interceptors for enigma.go connections.
    62  
    63  ### enummap
    64  
    65  Library for defining enums.
    66  
    67  ### generatedocs
    68  
    69  Tools to generate code readable documentation and markdown. 
    70  
    71  ### globals
    72  
    73  Defines variables used globally in a test run.
    74  
    75  ### globals/constant
    76  
    77  Defines global constants.
    78  
    79  ### helpers
    80  
    81  Set of helper methods used in other packages.
    82  
    83  ### logger
    84  
    85  Logging framework.
    86  
    87  ### metrics
    88  
    89  Defines Prometheus metrics.
    90  
    91  ### precisiontime
    92  
    93  Library for getting high-resolution timestamps.
    94  
    95  ### profile
    96  
    97  Library for adding profiling capabilities.
    98  
    99  ### randomizer
   100  
   101  Library for randomization of values. Each user gets a seeded randomizer based on instance and session numbers, which makes  tests reproducible.
   102  
   103  ### requestmetrics
   104  
   105  Handles metrics for requests. Used to report the result of a test.
   106  
   107  ### senseobjdef
   108  
   109  Handles the data structures of objects in Qlik Sense Enterprise. Decides how to select in objects, how to fetch data and where data resides in an object.
   110  
   111  ### senseobjects
   112  
   113  Defines the structures of some default objects in Qlik Sense Enterprise.
   114  
   115  ### session
   116  
   117  Handles the session state, which also includes handlers for pending requests.
   118  
   119  ### statistics
   120  
   121  Handles the collection of statistics for actions and REST requests, which are used in the test summary.
   122  
   123  ### version
   124  
   125  Struct used for setting the version of the tool.