messages

package
v1.3.71 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InformTypeStarted type when process started
	InformTypeStarted string = "Started"
	// InformTypeFinished type when process finished
	InformTypeFinished string = "Finished"
	// InformTypeFailed type when process failed
	InformTypeFailed string = "Failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InformMessage

type InformMessage struct {
	QueueMessage
	Type string    `json:"type"`
	At   time.Time `json:"at"`
}

InformMessage message with inform information

type Message

type Message interface {
	GetID() string
}

Message base message interface for sending to queue

type QueueMessage

type QueueMessage struct {
	ID    string `json:"id"`
	Tags  []Tag  `json:"tags,omitempty"`
	Error string `json:"error,omitempty"`
}

QueueMessage message going throuht broker

func NewQueueMessageFromM

func NewQueueMessageFromM(m *QueueMessage) *QueueMessage

NewQueueMessageFromM copies message

func (*QueueMessage) GetID added in v1.2.68

func (m *QueueMessage) GetID() string

GetID returm message's ID

type Tag

type Tag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Tag keeps key/value in message

Jump to

Keyboard shortcuts

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