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 ¶
func New() *Composer
NewComposer creates and returns a new instance of Composer. It initializes the Composer with an empty response map. It returns a pointer to the newly created Composer instance.
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) Wait ¶
Wait listens for a response on the provided channel and processes it using the given parser. It takes a context (ctx) of type context.Context, a parser of type handler.Parser, and a response channel (respChan) of type <-chan []byte. It does not return any values but may set an error on the Composer if the context is done or if parsing the response fails.