Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composer ¶
type Composer struct {
// contains filtered or unexported fields
}
func New ¶
New creates and returns a new instance of Composer. It takes depGraph of type map[string][]string which represents the dependency graph, and waiter of type core.Waiter which is used to manage synchronization. It returns a pointer to a Composer struct initialized with the provided depGraph and waiter.
func (*Composer) Compose ¶
Compose waits for all requests to finish and then returns the composed result. It does not take any parameters. It returns a map[string]any containing the composed result and an error if any occurred during composition. It returns an error if there was an issue during the composition process.
func (*Composer) Prepare ¶ added in v0.1.0
func (c *Composer) Prepare(ctx context.Context, name string, parser handler.Parser) (reqID string, depsResults map[string]any, err error)
Prepare initializes and prepares a request by composing dependencies and parsing the response. It takes a context.Context, a string name, and a handler.Parser. It returns an int64 request ID, a map of dependency results, and an error if the dependencies cannot be composed or the response cannot be parsed. It returns an error if the dependencies cannot be composed or the response cannot be parsed.