event

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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