Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOption = errors.New("unable to set option")
ErrOption indicates an error when adding an option.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// In Hj212 terminology, Token similar to the Session ID.
Token() string
SendMessage(m messaging.Message) error
Cancel() error
Done() <-chan struct{}
}
Client wraps Hj212 client.
type Service ¶
type Service interface {
// Publish Messssage
Publish(ctx context.Context, token string, msg messaging.Message) error
// Subscribes to channel with specified id, subtopic and adds subscription to
// service map of subscriptions under given ID.
Subscribe(ctx context.Context, key, chanID, subtopic string, c Client) error
// Unsubscribe method is used to stop observing resource.
Unsubscribe(ctx context.Context, key, chanID, subptopic, token string) error
}
Service specifies coap service API.
Click to show internal directories.
Click to hide internal directories.