Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 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, key things.ThingKey, msg protomfx.Message) error
// Subscribe subscribes to a profile with specified id.
Subscribe(ctx context.Context, key things.ThingKey, subtopic string, client *Client) error
// Unsubscribe method is used to stop observing resource.
Unsubscribe(ctx context.Context, key things.ThingKey, subtopic string) error
}
Service specifies web socket service API.
Click to show internal directories.
Click to hide internal directories.