message

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMessage

type BaseMessage struct {
	Sender uuid.UUID
}

new message types can extend this

func (*BaseMessage) GetSender

func (bm *BaseMessage) GetSender() uuid.UUID

type IMessage

type IMessage[T any] interface {
	// returns the sender of a message
	GetSender() uuid.UUID
	// calls the appropriate message handler method on the receiving agent
	InvokeMessageHandler(T)
}

base interface structure used for message - can be composed for more complex message structures

Jump to

Keyboard shortcuts

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