fog

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unhandled Result = handler.Unhandled
	Accepted         = handler.Accepted
	Rejected         = handler.Rejected
	Error            = handler.Error
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(producerProvider ProducerProvider, fogTopicPrefix string) *Handler

func (*Handler) Publish

func (this *Handler) Publish(clientId string, user string, topic string, payload []byte, qos int, size float64) (result handler.Result, err error)

the user param may be used in the future to check auth

func (*Handler) Subscribe

func (this *Handler) Subscribe(clientId string, user string, topic string) (result Result, err error)

the user param may be used in the future to check auth

type KeyWrapper

type KeyWrapper struct {
	Key string `json:"operator_id"`
}

type ProducerProvider

type ProducerProvider interface {
	GetProducer(qos platform_connector_lib.Qos) (producer kafka.ProducerInterface, err error)
}

type Result

type Result = handler.Result

Jump to

Keyboard shortcuts

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