sseconfig

package
v0.0.0-...-4f221f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

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

type Option func(*sse.Client)

Option is a function that configures the sse.Client.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient configures the http.Client to be used by the sse.Client.

func WithHeaders

func WithHeaders(headers map[string]string) Option

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL