chatd

package
v2.36.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RelaySourceHeader = "X-Coder-Relay-Source-Replica"

RelaySourceHeader marks replica-relayed stream requests.

Variables

This section is empty.

Functions

func NewStreamPartsDialer added in v2.35.0

func NewStreamPartsDialer(cfg StreamPartsDialerConfig) osschatd.StreamPartsDialer

NewStreamPartsDialer returns a dialer for the owning replica's parts endpoint.

Types

type RelayDialError added in v2.33.0

type RelayDialError struct {
	HTTPStatus int
	Err        error
}

RelayDialError wraps a failed relay handshake. HTTPStatus is 0 when the failure happened before a response.

func (*RelayDialError) Error added in v2.33.0

func (e *RelayDialError) Error() string

func (*RelayDialError) IsUnrecoverable added in v2.33.0

func (e *RelayDialError) IsUnrecoverable() bool

IsUnrecoverable reports whether retrying with the same captured session token is futile.

func (*RelayDialError) Unwrap added in v2.33.0

func (e *RelayDialError) Unwrap() error

type StreamPartsDialerConfig added in v2.35.0

type StreamPartsDialerConfig struct {
	ResolveReplicaAddress func(context.Context, uuid.UUID) (string, bool)
	ReplicaHTTPClient     *http.Client
	ReplicaIDFn           func() uuid.UUID
	DialerFn              func(context.Context, osschatd.StreamPartsDialInput) (osschatd.StreamPartsSession, error)
}

StreamPartsDialerConfig holds dependencies for multi-replica stream parts.

Jump to

Keyboard shortcuts

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