Documentation ¶
Index ¶
- Variables
- func SetServiceMethodSeparator(val string)
- type ClientSubscription
- type Conn
- type Engine
- type Notifier
- type SubID
- type WrapClient
- func (c *WrapClient) Close() error
- func (w *WrapClient) Closed() <-chan struct{}
- func (c *WrapClient) Do(ctx context.Context, result any, method string, params any) error
- func (c *WrapClient) Middleware(h jsonrpc.Handler) jsonrpc.Handler
- func (c *WrapClient) Mount(m jsonrpc.Middleware)
- func (c *WrapClient) Notify(ctx context.Context, method string, params any) error
- func (c *WrapClient) Subscribe(ctx context.Context, namespace string, channel any, args any) (ClientSubscription, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotificationsUnsupported is returned when the connection doesn't support notifications ErrNotificationsUnsupported = errors.New("notifications not supported") // ErrNotificationNotFound is returned when the notification for the given id is not found ErrSubscriptionNotFound = errors.New("subscription not found") // ErrNotificationNotFound is returned when the notification for the given id is not found ErrSubscriptionClosed = errors.New("subscription not found") )
Functions ¶
func SetServiceMethodSeparator ¶ added in v0.2.17
func SetServiceMethodSeparator(val string)
Types ¶
type ClientSubscription ¶
type Conn ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier is tied to a RPC connection that supports subscriptions. Server callbacks use the notifier to send notifications.
func NotifierFromContext ¶
NotifierFromContext returns the Notifier value stored in ctx, if any.
type WrapClient ¶
type WrapClient struct {
// contains filtered or unexported fields
}
func NewWrapClient ¶
func NewWrapClient(conn jsonrpc.Conn) *WrapClient
func (*WrapClient) Close ¶
func (c *WrapClient) Close() error
func (*WrapClient) Closed ¶
func (w *WrapClient) Closed() <-chan struct{}
func (*WrapClient) Middleware ¶
func (c *WrapClient) Middleware(h jsonrpc.Handler) jsonrpc.Handler
func (*WrapClient) Mount ¶
func (c *WrapClient) Mount(m jsonrpc.Middleware)
func (*WrapClient) Subscribe ¶
func (c *WrapClient) Subscribe(ctx context.Context, namespace string, channel any, args any) (ClientSubscription, error)
Click to show internal directories.
Click to hide internal directories.