A user obtains an instance of
GremlinService by invoking
getGremlinService().
The
GremlinServiceFactory accepts
GremlinCoordinatesProvider and
GremlinConfigurationResolver
as arguments, so those may be supplied if that functionality is opted into.
If anything in the configuration fails, a
PassthroughGremlinService is returned. This is a object which always
returns no experiments, but allows the customer to never think about null-handling during creation.
If the configuration succeeds, then a
ApiGremlinService is returned. This object makes calls to the Gremlin
API and returns experiments, as they get run.
The
GremlinService is used in the injection points created by the user.
This object is intended to be a singleton, as is the returned
GremlinService.