app

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diexodos

type Diexodos struct {
	LastMessageReceived time.Time
	Name                string
	InternalID          string
	MessageQueue        map[string]pb.InternalEpistello
	MessageUpdateCh     chan pb.MessageUpdate // Channel for task updates to be broadcasted
}

Diexodos represents a task queue

type EupalinosHandler

type EupalinosHandler struct {
	DiexodosMap []*Diexodos // Slice of Diexodos representing different queues
	Config      *config.Config
	pb.UnimplementedEupalinosServer
	// contains filtered or unexported fields
}

EupalinosHandler is the gRPC server handling task queue operations

func (*EupalinosHandler) DequeueMessage

func (s *EupalinosHandler) DequeueMessage(ctx context.Context, channelInfo *pb.ChannelInfo) (*pb.Epistello, error)

DequeueMessage handles message dequeueing from the specified channel

func (*EupalinosHandler) EnqueueMessage

func (s *EupalinosHandler) EnqueueMessage(ctx context.Context, message *pb.Epistello) (*pb.EnqueueResponse, error)

EnqueueMessage handles message enqueueing

func (*EupalinosHandler) GetQueueLength

func (s *EupalinosHandler) GetQueueLength(ctx context.Context, channelInfo *pb.ChannelInfo) (*pb.QueueLength, error)

GetQueueLength returns the length of the queue for the specified channel

func (*EupalinosHandler) LoadStateFromDisk

func (s *EupalinosHandler) LoadStateFromDisk()

LoadStateFromDisk loads the state of the message queues from disk on startup

func (*EupalinosHandler) SaveStateToDisk

func (s *EupalinosHandler) SaveStateToDisk()

SaveStateToDisk saves the state of the message queues to disk

func (*EupalinosHandler) StartAutoSave

func (s *EupalinosHandler) StartAutoSave()

StartAutoSave starts a goroutine to periodically save the state of the message queues to disk

func (*EupalinosHandler) StartBroadcasting

func (s *EupalinosHandler) StartBroadcasting()

StartBroadcasting starts a goroutine to handle broadcasting of task updates to replicas

func (*EupalinosHandler) StreamQueueUpdates

func (s *EupalinosHandler) StreamQueueUpdates(stream pb.Eupalinos_StreamQueueUpdatesServer) error

StreamQueueUpdates handles bidirectional streaming for task updates between Eupalinos pods

Jump to

Keyboard shortcuts

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