Files
box-box/internal/api/client.go

21 lines
337 B
Go
Raw Normal View History

2026-03-03 00:20:09 -05:00
package api
import (
"net/http"
"time"
)
type OpenF1Client struct {
url string
httpClient *http.Client
2026-03-03 01:16:04 -05:00
cache *FileCache
2026-03-03 00:20:09 -05:00
}
func NewOpenF1Client(url string, timeout time.Duration) *OpenF1Client {
return &OpenF1Client{
url: url,
httpClient: &http.Client{Timeout: timeout},
2026-03-03 01:16:04 -05:00
cache: NewFileCache(),
2026-03-03 00:20:09 -05:00
}
}