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
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.
Click to show internal directories.
Click to hide internal directories.