Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFailedMessagePublish indicates that message publishing failed. ErrFailedMessagePublish = errors.New("failed to publish message") // ErrFailedSubscription indicates that client couldn't subscribe. ErrFailedSubscription = errors.New("failed to subscribe") // ErrFailedUnsubscribe indicates that client couldn't unsubscribe. ErrFailedUnsubscribe = errors.New("failed to unsubscribe") ErrUnauthorizedAccess = errors.New("missing or invalid credentials provided") // ErrEmptyTopic indicate absence of thingKey in the request. ErrEmptyTopic = errors.New("empty topic") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles messaging and websocket connection
type Service ¶
type Service interface { // Publish Message Publish(ctx context.Context, thingKey string, msg protomfx.Message) error // Subscribe subscribes to a profile with specified id. Subscribe(ctx context.Context, thingKey, subtopic string, client *Client) error // Unsubscribe method is used to stop observing resource. Unsubscribe(ctx context.Context, thingKey, subtopic string) error }
Service specifies web socket service API.
Click to show internal directories.
Click to hide internal directories.