Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Credentials interface { DeviceID() string Hostname() string TLSConfig() *tls.Config IsSAS() bool Token(ctx context.Context, uri string, d time.Duration) (string, error) }
Credentials is connection credentials needed for x509 or sas authentication.
type MessageDispatcher ¶
MessageDispatcher handles incoming messages.
type MethodDispatcher ¶
type MethodDispatcher interface {
Dispatch(methodName string, b []byte) (rc int, data []byte, err error)
}
MethodDispatcher handles direct method calls.
type Transport ¶
type Transport interface { Connect(ctx context.Context, creds Credentials) error Send(ctx context.Context, msg *common.Message) error RegisterDirectMethods(ctx context.Context, mux MethodDispatcher) error SubscribeEvents(ctx context.Context, mux MessageDispatcher) error SubscribeTwinUpdates(ctx context.Context, mux TwinStateDispatcher) error RetrieveTwinProperties(ctx context.Context) (payload []byte, err error) UpdateTwinProperties(ctx context.Context, payload []byte) (version int, err error) Close() error }
Transport interface.
type TwinStateDispatcher ¶
type TwinStateDispatcher interface {
Dispatch(b []byte)
}
TwinStateDispatcher handles twin state updates.
Click to show internal directories.
Click to hide internal directories.