spinner

package module
v0.0.0-...-85f1ffb Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

spinner

Maintain socket connections to clients to spin up instances.

Base Functionality

  • Keep a list of machines (captain) by open socket connect
  • Ferry data between captains and nebula central

Possible Removal

The spinner may be later deprecated and removed.
It's functionality being replaced by:

  • Captains hearbeat to a storage system
  • IP as a service (like ngrok)

In this case the classic spinner will become purely a ferry. A ferry that is agnostic to what underlying data and components it interacts with.

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 {
	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(port int)
}

Server for the Nebula Spinner

func New

func New() Server

Produces a new Server interface of struct server

type Task

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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