Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageTypeUnknown = common.MessageTypeUnknown MessageTypeData = common.MessageTypeData MessageTypeError = common.MessageTypeError MessageTypeComplete = common.MessageTypeComplete MessageTypeConnectionError = common.MessageTypeConnectionError TransportWS = common.TransportWS TransportSSE = common.TransportSSE SubprotocolAuto = common.SubprotocolAuto SubprotocolGraphQLTransportWS = common.SubprotocolGraphQLTransportWS SubprotocolGraphQLWS = common.SubprotocolGraphQLWS SSEMethodPOST = common.SSEMethodPOST SSEMethodGET = common.SSEMethodGET )
Variables ¶
View Source
var ( ErrConnectionClosed = common.ErrConnectionClosed ErrConnectionError = protocol.ErrConnectionError ErrAckTimeout = protocol.ErrAckTimeout ErrAckNotReceived = protocol.ErrAckNotReceived ErrSubscriptionExists = transport.ErrSubscriptionExists ErrDialFailed = transport.ErrDialFailed ErrInitFailed = transport.ErrInitFailed )
View Source
var ErrClientClosed = errors.New("client closed")
ErrClientClosed is returned when Subscribe is called after the client's context has been canceled.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
UpgradeClient *http.Client
StreamingClient *http.Client
Logger abstractlogger.Logger
PingInterval time.Duration
PingTimeout time.Duration
AckTimeout time.Duration
WriteTimeout time.Duration
ReadLimit int64
WSIdleTimeout time.Duration
}
Config holds the client configuration.
type ErrFailedUpgrade ¶
type ErrFailedUpgrade = transport.ErrFailedUpgrade
type ErrInvalidSubprotocol ¶
type ErrInvalidSubprotocol = transport.ErrInvalidSubprotocol
type ExecutionResult ¶
type ExecutionResult = common.ExecutionResult
type MessageType ¶
type MessageType = common.MessageType
type Stats ¶
type Stats struct {
WSConns int // active WebSocket connections
SSEConns int // active SSE connections
}
Stats contains client statistics.
type TransportType ¶
type TransportType = common.TransportType
type WSSubprotocol ¶
type WSSubprotocol = common.WSSubprotocol
Click to show internal directories.
Click to hide internal directories.