Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct {
Command CommandType `json:"command"`
}
type CommandHandler ¶
type CommandHandler interface { SupportsCommand(commandType CommandType) bool HandleCommand(client *websockethub.Client, message []byte) error }
type CommandManager ¶
type CommandManager struct {
// contains filtered or unexported fields
}
func NewCommandHandler ¶
func NewCommandHandler(log *logger.Logger, subscriptionManager *subscriptionmanager.SubscriptionManager[websockethub.ClientID, string]) *CommandManager
func (*CommandManager) HandleNodeCommands ¶
func (c *CommandManager) HandleNodeCommands(client *websockethub.Client, message []byte) error
type CommandType ¶
type CommandType string
const ( CommandSubscribe CommandType = "subscribe" CommandUnsubscribe CommandType = "unsubscribe" )
type SubscriptionCommand ¶
type SubscriptionCommand struct { BaseCommand Topic string `json:"topic"` }
type SubscriptionCommandHandler ¶
type SubscriptionCommandHandler struct {
// contains filtered or unexported fields
}
func (*SubscriptionCommandHandler) HandleCommand ¶
func (s *SubscriptionCommandHandler) HandleCommand(client *websockethub.Client, message []byte) error
func (*SubscriptionCommandHandler) SupportsCommand ¶
func (s *SubscriptionCommandHandler) SupportsCommand(commandType CommandType) bool
type SubscriptionEvent ¶
Click to show internal directories.
Click to hide internal directories.