Skip to content

Commit

Permalink
add WsSubscribe to client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagleft committed Feb 15, 2023
1 parent 792344d commit 3108909
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions v2/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utopiago
import (
"github.com/Sagleft/utopialib-go/v2/internal/utopia"
"github.com/Sagleft/utopialib-go/v2/pkg/structs"
"github.com/Sagleft/utopialib-go/v2/pkg/websocket"
)

type Client interface {
Expand Down Expand Up @@ -49,6 +50,10 @@ type Client interface {
// SetWebSocketState - set WSS Notification state
SetWebSocketState(task structs.SetWsStateTask) error

// WsSubscribe - connect to websocket & receive messages.
// NOTE: it's blocking method
WsSubscribe(task websocket.WsSubscribeTask) error

// SendChannelMessage - send channel message & get message ID
SendChannelMessage(channelID, message string) (string, error)

Expand Down

0 comments on commit 3108909

Please sign in to comment.