emitter

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

Message event emitter struct

func New

func New() *Message

New creates a new message emitter

func (Message) Close

func (e Message) Close()

Close the channel

func (*Message) GetMessage

func (e *Message) GetMessage() (string, error)

GetMessage returns a message from the channel

func (*Message) Publish

func (e *Message) Publish(msg string)

Publish a message

type MessageGetPublish

type MessageGetPublish interface {
	MessagePublisher
	GetMessage() (string, error)
}

MessageGetPublish is an interface that defines the method to publish a message and get a message

type MessageGetPublishCloser

type MessageGetPublishCloser interface {
	MessagePublisher
	MessageGetPublish
	Close()
}

MessageGetPublishCloser is an interface that defines the method to publish a message, get a message and close the emitter

type MessagePublisher

type MessagePublisher interface {
	Publish(msg string)
}

MessagePublisher is an interface that defines the method to publish a message

Jump to

Keyboard shortcuts

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