switch to iterators and client polling
Publish / release (push) Failing after 17m20s

This commit is contained in:
2026-06-22 22:20:32 -04:00
parent 24fe4258f7
commit f174c2922c
7 changed files with 154 additions and 143 deletions
-12
View File
@@ -88,7 +88,6 @@ type Client struct {
wingbits Endpoint
tar1090 *Endpoint
http *http.Client
streamBuf int
userAgent string
}
@@ -118,16 +117,6 @@ func WithHTTPClient(h *http.Client) Option {
return func(c *Client) { c.http = h }
}
// WithStreamBufferSize sets the buffer size of channels returned by the Stream*
// methods. The default is 1.
func WithStreamBufferSize(n int) Option {
return func(c *Client) {
if n >= 0 {
c.streamBuf = n
}
}
}
// WithUserAgent overrides the User-Agent header sent with requests.
func WithUserAgent(ua string) Option {
return func(c *Client) { c.userAgent = ua }
@@ -137,7 +126,6 @@ func WithUserAgent(ua string) Option {
// Host must be supplied via WithWingbitsEndpoint.
func New(opts ...Option) (*Client, error) {
c := &Client{
streamBuf: 1,
userAgent: "wingbits-go/1.0",
}
for _, opt := range opts {