event

package
v0.0.0-...-d8b21ba Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTEventSender

type MQTTEventSender[T any] struct {
	Cfg autopaho.ClientConfig
	// contains filtered or unexported fields
}

func NewMQTTEventSender

func NewMQTTEventSender[T any](broker *url.URL, clientId string) *MQTTEventSender[T]

func (*MQTTEventSender[T]) Connect

func (m *MQTTEventSender[T]) Connect(ctx context.Context) error

func (*MQTTEventSender[T]) Disconnect

func (m *MQTTEventSender[T]) Disconnect(ctx context.Context) error

func (*MQTTEventSender[T]) Send

func (m *MQTTEventSender[T]) Send(ctx context.Context, event api.Event[T]) error

type MultiEventSender

type MultiEventSender[T any] struct {
	// contains filtered or unexported fields
}

func NewMultiEventSender

func NewMultiEventSender[T any](senders ...Sender[T]) *MultiEventSender[T]

func (*MultiEventSender[T]) Send

func (e *MultiEventSender[T]) Send(ctx context.Context, event api.Event[T]) error

type Sender

type Sender[T any] interface {
	Send(ctx context.Context, event api.Event[T]) error
}

type Subscriber

type Subscriber interface {
	Subscribe(t ...api.EventType) chan interface{}
}

type WebsocketEventService

type WebsocketEventService[T any] struct {
	// contains filtered or unexported fields
}

func NewWebsocketEventService

func NewWebsocketEventService[T any]() *WebsocketEventService[T]

func (*WebsocketEventService[T]) Send

func (e *WebsocketEventService[T]) Send(ctx context.Context, event api.Event[T]) error

func (*WebsocketEventService[T]) Subscribe

func (e *WebsocketEventService[T]) Subscribe(t ...api.EventType) chan interface{}

Jump to

Keyboard shortcuts

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