server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessEvents

func ProcessEvents(input <-chan Event)

Types

type CedanaOrchestrator

type CedanaOrchestrator struct {

	// used to coordinate checkpoints across multiple goroutines
	CmdChannel chan types.ServerCommand
	// contains filtered or unexported fields
}

func NewOrchestrator

func NewOrchestrator(
	orchestratorId string,
	jobId string,
	clientId string,
	nc *nats.Conn,
	logger *zerolog.Logger,
) *CedanaOrchestrator

func (*CedanaOrchestrator) AttachNewWorker

func (co *CedanaOrchestrator) AttachNewWorker(id string)

func (*CedanaOrchestrator) GenClientStateIterator

func (co *CedanaOrchestrator) GenClientStateIterator(ctx context.Context) (jetstream.MessagesContext, error)

func (*CedanaOrchestrator) GenMetaStateIterator

func (co *CedanaOrchestrator) GenMetaStateIterator(ctx context.Context) (jetstream.MessagesContext, error)

MetaState refers to provider state - instance revocations, hardware failures or provider shutdowns are broadcast on this iterator.

func (*CedanaOrchestrator) HeartbeatCheckpoint

func (co *CedanaOrchestrator) HeartbeatCheckpoint(heartbeatTicker *time.Ticker)

func (*CedanaOrchestrator) ProcessClientState

func (co *CedanaOrchestrator) ProcessClientState(stateIter jetstream.MessagesContext)

run continuously, as a gofunction

func (*CedanaOrchestrator) ProcessMetaState

func (co *CedanaOrchestrator) ProcessMetaState(stateIter jetstream.MessagesContext)

func (*CedanaOrchestrator) PublishCommand

func (co *CedanaOrchestrator) PublishCommand(ctx context.Context, command types.ServerCommand)

func (*CedanaOrchestrator) Start

func (co *CedanaOrchestrator) Start() error

type Event

type Event struct {
	ID      string
	Type    string
	Payload interface{}
}

Jump to

Keyboard shortcuts

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