spinner

package module
v0.0.0-...-c459cb1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 11 Imported by: 0

README

What is this?

Spinner is a computation resource manager in the project, Armada. It manages a group of worker nodes, captain, in the system. It is responsible for node registration, node management, and task instance placement.

Quick Start

Prerequisites: Docker

To download the spinner image run:
docker pull armadaumn/spinner:latest
To start the spinner just run:
docker run -it --rm -p 5912:5912 armadaumn/spinner:latest

Build from the source

Prerequisites: Go environment, open port 5912

Build and run spinner:

git clone https://github.com/armadanet/spinner.git
cd spinner/build
make run

Documentation

Overview

Nebula Spinner server to maintain socket connections to Captains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Run()
	// Enter client into messenger system
	Register()
	// Quit the client
	Quit()
}

Single client (Captain) connection

func NewClient

func NewClient(h *Handler, socket *comms.Socket) Client

Create new Client interface of client struct

type Handler

type Handler struct {

	// Messenger for requester (tasks)
	Requester *comms.Messenger

	//
	Register chan *comms.Instance

	Unregister chan *comms.Instance

	Request chan *Request
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler() *Handler

func (*Handler) SendTask

func (h *Handler) SendTask(from *comms.Instance, task *dockercntrl.Config) bool

func (*Handler) Start

func (h *Handler) Start()

type Request

type Request struct {
	Success chan bool
	Task    *Task
}

type Requester

type Requester interface {
	// Accept reading from the client
	Run()
	// Enter client into messenger system
	Register()
	// Quit the client
	Quit()
}

Single container requestor interface

func NewRequester

func NewRequester(h *Handler, socket *comms.Socket) Requester

Create new Client interface of client struct

type Server

type Server interface {
	// Given a port of 0, assigns a free port to the server.
	Run(beaconURL string, port int)
}

Server for the Nebula Spinner

func New

func New(container_name string) (Server, error)

Produces a new Server interface of struct server

type Task

type Task struct {
	Config *dockercntrl.Config
	From   *uuid.UUID
}

Directories

Path Synopsis
spinresp module

Jump to

Keyboard shortcuts

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