// Code generated by Fern. DO NOT EDIT.

package health

import (
    core "pentagi/pkg/observability/langfuse/api/core"
    internal "pentagi/pkg/observability/langfuse/api/internal"
    context "context"
    option "pentagi/pkg/observability/langfuse/api/option"
    api "pentagi/pkg/observability/langfuse/api"
)


type Client struct {
    WithRawResponse *RawClient

    options *core.RequestOptions
    baseURL string
    caller *internal.Caller
}

func NewClient(options *core.RequestOptions) *Client {
    return &Client{
        WithRawResponse: NewRawClient(options),
        options: options,
        baseURL: options.BaseURL,
        caller: internal.NewCaller(
            &internal.CallerParams{
                Client: options.HTTPClient,
                MaxAttempts: options.MaxAttempts,
            },
        ),
    }
}

// Check health of API and database
func (c *Client) Health(
    ctx context.Context,
    opts ...option.RequestOption,
) (*api.HealthResponse, error){
    response, err := c.WithRawResponse.Health(
        ctx,
        opts...,
    )
    if err != nil {
        return nil, err
    }
    return response.Body, nil
}

