Documentation
¶
Overview ¶
The github.com/r3labs/sse/v2 package provides an interface for creating clients that takes options but doesn't implement any of the options. This file implements the options for the github.com/r3labs/sse/v2 package so it can be configured with the idiomatic With*Option pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a function that configures the sse.Client.
func WithHTTPClient ¶
WithHTTPClient configures the http.Client to be used by the sse.Client.
func WithHeaders ¶
WithHeaders configures the sse.Client with the provided custom headers.
func WithResponseValidator ¶
func WithResponseValidator( responseValidator sse.ResponseValidator, ) Option
WithResponseValidator configures the sse.Client with the provided response validator. The response validator is used to validate the response from the server in order to handle non-200 status codes and other errors.