client

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRpcInvocationError

func IsRpcInvocationError(err error) bool

IsRpcInvocationError Rpc invocation failed errors are returned by the gate client when the rpc call fails.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts *rpc.ClientOptions) (*Client, error)

func (*Client) CreateChannel

func (c *Client) CreateChannel(ch subscription.ChanID, update *subscription.ChanInfo) error

func (*Client) EnqueueMessage

func (c *Client) EnqueueMessage(id gate.ID, message *messages.GlideMessage) error

func (*Client) ExitClient

func (c *Client) ExitClient(id gate.ID) error

func (*Client) Publish

func (c *Client) Publish(ch subscription.ChanID, msg subscription.Message) error

func (*Client) RemoveChannel

func (c *Client) RemoveChannel(ch subscription.ChanID) error

func (*Client) SetClientID

func (c *Client) SetClientID(old gate.ID, new_ gate.ID) error

func (*Client) Subscribe

func (c *Client) Subscribe(ch subscription.ChanID, id subscription.SubscriberID, extra interface{}) error

func (*Client) UnSubscribe

func (c *Client) UnSubscribe(ch subscription.ChanID, id subscription.SubscriberID) error

func (*Client) UpdateChannel

func (c *Client) UpdateChannel(ch subscription.ChanID, update *subscription.ChanInfo) error

func (*Client) UpdateSubscriber

func (c *Client) UpdateSubscriber(ch subscription.ChanID, id subscription.SubscriberID, extra interface{}) error

type GatewayRpcClient

type GatewayRpcClient struct {
	// contains filtered or unexported fields
}

func (*GatewayRpcClient) EnqueueMessage

func (I *GatewayRpcClient) EnqueueMessage(ctx context.Context, request *proto.EnqueueMessageRequest, response *proto.Response) error

func (*GatewayRpcClient) UpdateClient

func (I *GatewayRpcClient) UpdateClient(ctx context.Context, request *proto.UpdateClient, response *proto.Response) error

type GatewayRpcImpl

type GatewayRpcImpl struct {
	// contains filtered or unexported fields
}

func NewGatewayRpcImpl

func NewGatewayRpcImpl(opts *rpc.ClientOptions) (*GatewayRpcImpl, error)

func NewGatewayRpcImplWithClient

func NewGatewayRpcImplWithClient(client *rpc.BaseClient) *GatewayRpcImpl

func (*GatewayRpcImpl) Close

func (i *GatewayRpcImpl) Close() error

func (*GatewayRpcImpl) EnqueueMessage

func (i *GatewayRpcImpl) EnqueueMessage(id gate.ID, message *messages.GlideMessage) error

func (*GatewayRpcImpl) ExitClient

func (i *GatewayRpcImpl) ExitClient(id gate.ID) error

func (*GatewayRpcImpl) SetClientID

func (i *GatewayRpcImpl) SetClientID(old gate.ID, new_ gate.ID) error

func (*GatewayRpcImpl) UpdateClient

func (i *GatewayRpcImpl) UpdateClient(id gate.ID, info *gate.ClientSecrets) error

type IMServiceError

type IMServiceError struct {
	Code    int32
	Message string
}

func (*IMServiceError) Error

func (e *IMServiceError) Error() string

type SubscriptionRpcImpl

type SubscriptionRpcImpl struct {
	// contains filtered or unexported fields
}

func NewSubscriptionRpcImpl

func NewSubscriptionRpcImpl(opts *rpc.ClientOptions) (*SubscriptionRpcImpl, error)

func NewSubscriptionRpcImplWithClient

func NewSubscriptionRpcImplWithClient(cli *rpc.BaseClient) *SubscriptionRpcImpl

func (*SubscriptionRpcImpl) Close

func (s *SubscriptionRpcImpl) Close() error

func (*SubscriptionRpcImpl) CreateChannel

func (s *SubscriptionRpcImpl) CreateChannel(ch subscription.ChanID, update *subscription.ChanInfo) error

func (*SubscriptionRpcImpl) Publish

func (*SubscriptionRpcImpl) RemoveChannel

func (s *SubscriptionRpcImpl) RemoveChannel(ch subscription.ChanID) error

func (*SubscriptionRpcImpl) Subscribe

func (s *SubscriptionRpcImpl) Subscribe(ch subscription.ChanID, id subscription.SubscriberID, extra interface{}) error

func (*SubscriptionRpcImpl) UnSubscribe

func (*SubscriptionRpcImpl) UpdateChannel

func (s *SubscriptionRpcImpl) UpdateChannel(ch subscription.ChanID, update *subscription.ChanInfo) error

func (*SubscriptionRpcImpl) UpdateSubscriber

func (s *SubscriptionRpcImpl) UpdateSubscriber(ch subscription.ChanID, id subscription.SubscriberID, extra interface{}) error

Jump to

Keyboard shortcuts

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