Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #22196

Closed (moved)
(moved)
Open
Created May 08, 2017 by Karsten Loesing@karsten

Configure descriptor sources using method chaining

The two descriptor sources DescriptorReader and DescriptorParser are instantiated by DescriptorSourceFactory, configured, and then executed. This requires state checks and leads to quite verbose application code. An exception to this is DescriptorCollector which is state-less but which has a method with 5 parameters, which also does not produce very readable code.

We should consider switching to configuring descriptor sources using method chanining. Here's a code sample from a few months ago, written for another ticket.

iwakeh rightly commented on that other ticket: "configuration of a descriptor source by fluent-style (or method chaining) is fine, but metrics-lib currently has the DescriptorSourceFactory approach, which would need to be adapted. That is, I see two things: the ideas around the code of DescriptorSourceBuilder are ideas about a new way of configuration and not exception/error handling in metrics-lib, i.e. a different ticket (there is one for redesign of the interface hierarchy, I'll look for it). Second, the current configuration and descriptor source instanciation need to be considered together (in that other ticket)."

Not assigning to a milestone on purpose. This likely needs more thoughts before we can write code and make plans for releasing that.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking