coap

package
v1.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

CreateBackend creates a new CoAP client backend

func (*CoAPClientBackendFactory) GetBackendType

GetBackendType returns the backend type this factory creates

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL