duplex

package
v1.26.7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosed      = errors.New("duplex closed")
	ErrRejected    = errors.New("duplex rejected")
	ErrUnavailable = errors.New("duplex unavailable")
	ErrFailed      = errors.New("duplex failed")
)

Functions

func IsExpectedDisconnect

func IsExpectedDisconnect(err error) bool

func NewError

func NewError(kind error, reason string) error

Types

type Duplex

type Duplex interface {
	Send(ctx context.Context, b []byte) error
	Recv(ctx context.Context) ([]byte, error)
	Close(cause error) error
}

Duplex represents a bidirectional communication channel between the Host and an authenticated and connected plugin. This is implemented by a WebSocket.

type Error

type Error struct {
	Kind   error
	Reason string
}

func (Error) Error

func (e Error) Error() string

func (Error) Is

func (e Error) Is(target error) bool

Jump to

Keyboard shortcuts

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