Versions in this module Expand all Collapse all v1 v1.0.2 Mar 13, 2024 v1.0.1 Mar 13, 2024 Changes in this version + type Client struct + func NewClient(connStr string, hubName string, opts ...ClientOption) (*Client, error) + func (c *Client) AddUserToGroup(ctx context.Context, groupName string, userID string) error + func (c *Client) BroadcastAll(ctx context.Context, msg *InvocationMessage) error + func (c *Client) BroadcastGroup(ctx context.Context, msg *InvocationMessage, groupName string) error + func (c *Client) GetHub() string + func (c *Client) GetName() string + func (c *Client) Listen(ctx context.Context, handler Handler) error + func (c *Client) RemoveUserFromAllGroups(ctx context.Context, userID string) error + func (c *Client) RemoveUserFromGroup(ctx context.Context, groupName string, userID string) error + func (c *Client) SendInvocation(ctx context.Context, uri string, msg *InvocationMessage) error + func (c *Client) SendToUser(ctx context.Context, msg *InvocationMessage, userID string) error + type ClientOption func(*Client) error + func ClientWithName(name string) ClientOption + type Handler interface + Default func(ctx context.Context, target string, args []json.RawMessage) error + type HandlerFunc func(ctx context.Context, target string, args []json.RawMessage) error + func (hf HandlerFunc) Default(ctx context.Context, target string, args []json.RawMessage) error + type InvocationMessage struct + Arguments []json.RawMessage + Error string + Headers map[string]string + InvocationID string + Target string + Type messageType + func NewInvocationMessage(target string, args ...interface{}) (*InvocationMessage, error) + type NotifiedHandler interface + OnStart func() + func NewNotifiedHandler(base Handler, onStart func()) NotifiedHandler + type ParsedConnString struct + Endpoint *url.URL + Key string + Version string + func ParseConnectionString(connStr string) (*ParsedConnString, error) + type SendFailureError struct + Body string + StatusCode int + func (sfe SendFailureError) Error() string