gshellos

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 32 Imported by: 0

README

Introduction

gshell is gshellos based service management tool.
gshellos is a simple pure golang service framework for linux devices that provides:

  • Flexible running model
    • Mixed execution mode to run go apps/services
      • interpreted mode for flexibility, compiled mode for performance
      • mix-used in runtime, easy to switch
    • Isolated Gshell Runtime Environment(GRE)
      • one service/app runs in one GRE
      • GRE has separate OS input, output, args
      • GREs share memory by communicating
    • App/service group mechanism
      • GREs can be grouped to run in one Gshell Runtime Group(GRG)
      • applicable real-time scheduling policy on GRG
      • zero communication cost in same GRG: zero data copy, no kernel round trip
      • group/ungroup by gshell command line at runtime
    • Remote deployment
  • Simplified and unified communication
    • Name based service publishing/discovery
      • a service is published under the name of {"publisher", "service"}
      • 4 scopes of service visibility: Process, OS, LAN, WAN
      • a service can be published in all the above scopes
      • a service is discovered in the above scope order
    • Message oriented client-server communication
      • servers define message structs, clients import message structs
      • simple Send(msg) Recv(msgPtr) API and RPC alike SendRecv(msgSnd, msgRcvPtr) API
      • data encoding/serializing when necessary
      • messages can be reordered by predefined priority
    • High concurrency model
      • client side multiplexed connection
      • server side auto scale worker pool
      • of course go routines and go channels
  • Zero deploy dependency on all CPU arch
    • X86, ARM, MIPS, PPC...
    • embedded boxes, cloud containers, server VMs...
    • only one binary is needed
  • Zero cost for service/app migration between different scopes/machines/locations
    • no code change, no recompile, no redeploy
    • gshell command line to move services/apps around at runtime
  • Auto update without impacting the running services
  • Interactive and native debugging with built-in REPL shell
  • P2P network model
    • zero config, self discovered and managed network
    • auto reverse proxy for service behind NAT

Architecture

gshell architecture

Docs

See also

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBrokenGRG is an error where the specified GRG has problem to run.
	ErrBrokenGRG = errors.New("broken GRG")
	// ErrNoUpdate is an error that no update available
	ErrNoUpdate = errors.New("no update available")
)

Functions

func RunShCmd added in v1.2.1

func RunShCmd(cmd string) string

RunShCmd runs a command and returns its output. The command will be running in background and output is discarded if it ends with &.

func ShellMain

func ShellMain() error

ShellMain is the main entry of gshell

Types

This section is empty.

Directories

Path Synopsis
cmd
extract
taken from github.com/traefik/yaegi/cmd/yaegi/extract.go
taken from github.com/traefik/yaegi/cmd/yaegi/extract.go
Package extension provides wrappers to selected packages to be imported natively in Yaegi.
Package extension provides wrappers to selected packages to be imported natively in Yaegi.
Package stdlib provides wrappers of standard library packages to be imported natively in Yaegi.
Package stdlib provides wrappers of standard library packages to be imported natively in Yaegi.

Jump to

Keyboard shortcuts

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