config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderSSE is the SSE provider.
	ProviderSSE = "sse"
	// ProviderWebSocket is the websocket provider.
	ProviderWebSocket = "websocket"
)

Variables

This section is empty.

Functions

func ProvideBidirectionalEventStreamUpgrader

func ProvideBidirectionalEventStreamUpgrader(logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config) (eventstream.BidirectionalEventStreamUpgrader, error)

ProvideBidirectionalEventStreamUpgrader provides a BidirectionalEventStreamUpgrader based on configuration.

func ProvideEventStreamUpgrader

func ProvideEventStreamUpgrader(logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config) (eventstream.EventStreamUpgrader, error)

ProvideEventStreamUpgrader provides an EventStreamUpgrader based on configuration.

func RegisterBidirectionalEventStreamUpgrader

func RegisterBidirectionalEventStreamUpgrader(i do.Injector)

RegisterBidirectionalEventStreamUpgrader registers an eventstream.BidirectionalEventStreamUpgrader with the injector.

func RegisterEventStreamUpgrader

func RegisterEventStreamUpgrader(i do.Injector)

RegisterEventStreamUpgrader registers an eventstream.EventStreamUpgrader with the injector.

Types

type Config

type Config struct {
	WebSocket *websocket.Config `env:"init"     envPrefix:"WEBSOCKET_" json:"websocket,omitempty"`
	Provider  string            `env:"PROVIDER" json:"provider"`
}

Config is the configuration for the event stream provider.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

Jump to

Keyboard shortcuts

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