orchestrator

package
v0.0.0-...-ca37748 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DisconnectStaleNodePeriod = 10 * time.Second

Variables

This section is empty.

Functions

func DisconnectThread

func DisconnectThread(orchestrator *Orchestrator, ctx context.Context, logger *slog.Logger, done func())

func GetCliCommand

func GetCliCommand() *cli.Command

func OServerThread

func OServerThread(orchestrator *Orchestrator, ctx context.Context, logger *slog.Logger, done func())

Types

type NodeConnection

type NodeConnection struct {
	Name            string    `json:"name"`
	Address         string    `json:"address"`
	Port            int       `json:"port"`
	LastInteraction time.Time `json:"last_interaction"`
}

type NodeRegistration

type NodeRegistration struct {
	NodeName string `json:"name"`
	NodeAddr string `json:"addr"`
	NodePort int    `json:"port"`
}

type Orchestrator

type Orchestrator struct {
	Port     int
	Nodes    map[string]*NodeConnection
	LogFile  string
	CertPath string
}

func (*Orchestrator) Run

func (orchestrator *Orchestrator) Run() (err error)

Jump to

Keyboard shortcuts

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