Documentation
¶
Index ¶
- func GetCoAPClientBackendFactory() backends.ClientBackendFactory
- type CoAPClientBackend
- func (c *CoAPClientBackend) CheckHealth() error
- func (c *CoAPClientBackend) Close() error
- func (c *CoAPClientBackend) SendMessage(method string, jsonString string, prvKey string, insecure bool, ...) (string, error)
- func (c *CoAPClientBackend) SendRawMessage(jsonString string, insecure bool) (string, error)
- type CoAPClientBackendFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCoAPClientBackendFactory ¶
func GetCoAPClientBackendFactory() backends.ClientBackendFactory
GetCoAPClientBackendFactory returns a CoAP client backend factory This function is used to avoid import cycles while allowing registration
Types ¶
type CoAPClientBackend ¶
type CoAPClientBackend struct {
// contains filtered or unexported fields
}
CoAPClientBackend implements client backend using CoAP
func NewCoAPClientBackend ¶
func NewCoAPClientBackend(config *backends.ClientConfig) (*CoAPClientBackend, error)
NewCoAPClientBackend creates a new CoAP client backend
func (*CoAPClientBackend) CheckHealth ¶
func (c *CoAPClientBackend) CheckHealth() error
CheckHealth checks the health of the CoAP server
func (*CoAPClientBackend) Close ¶
func (c *CoAPClientBackend) Close() error
Close closes the CoAP connection and cleans up blueprints
func (*CoAPClientBackend) SendMessage ¶
func (c *CoAPClientBackend) SendMessage(method string, jsonString string, prvKey string, insecure bool, ctx context.Context) (string, error)
SendMessage sends an RPC message with authentication via CoAP
func (*CoAPClientBackend) SendRawMessage ¶
func (c *CoAPClientBackend) SendRawMessage(jsonString string, insecure bool) (string, error)
SendRawMessage sends a raw JSON message via CoAP
type CoAPClientBackendFactory ¶
type CoAPClientBackendFactory struct{}
CoAPClientBackendFactory creates CoAP client backends
func NewCoAPClientBackendFactory ¶
func NewCoAPClientBackendFactory() *CoAPClientBackendFactory
NewCoAPClientBackendFactory creates a new CoAP client backend factory
func (*CoAPClientBackendFactory) CreateBackend ¶
func (f *CoAPClientBackendFactory) CreateBackend(config *backends.ClientConfig) (backends.ClientBackend, error)
CreateBackend creates a new CoAP client backend
func (*CoAPClientBackendFactory) GetBackendType ¶
func (f *CoAPClientBackendFactory) GetBackendType() backends.ClientBackendType
GetBackendType returns the backend type this factory creates