INNER CODE UNIT · Go
WithTimeout
movio/bramble · client.go:108
func WithTimeout(timeout time.Duration) ClientOpt {
return func(s *GraphQLClient) {
s.HTTPClient.Timeout = timeout
}
}
// WithUserAgent set the user agent used by the client.
func WithUserAgent(userAgent string) ClientOpt {
return func(s *GraphQLClient) {
s.UserAgent = userAgent
}
}
// Request executes a GraphQL request.
func (c *GraphQLClient) Request(ctx context.Context, url string, request *Request, out interface{}) error {
ctx, span := c.tracer.Start(ctx, "GraphQL Request",
trace.WithSpanKind(trace.SpanKindClient),
trace.WithAttributes(