gsm

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

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

Go to latest
Published: Nov 5, 2013 License: MIT Imports: 11 Imported by: 0

README

gem-server-manager

Helps manage your gem server by fetching gems

gem-server-manager ("gsm") consumes instructions from an AMQP queue regarding which of your applications have been updated, so it can pull down the requisite gems into your GEMDIR.

The Gem Library Updater (GLU) consumes from an AMQP queue. It expects the message body to be a JSON payload that looks something like this:

{
  "rev": "master",
  "repo_name": "gem-server-manager",
  "repo_owner": "rafecolton"
}

It then users a GitHub API key to pull down the raw Gemfile and Gemfile.lock from your repo. It then pulls down your gems from Rubygems and uploads them to your geminabox server.

Documentation

Index

Constants

View Source
const SCRIPT_STRING = `` /* 2085-byte string literal not displayed */

Variables

View Source
var (
	Version string
	Rev     string
)
View Source
var ApplicationJsonRegex = regexp.MustCompile(`^application/json`)

Functions

func ProgVersion

func ProgVersion() string

Types

type BundleExecer

type BundleExecer struct {
	Configuration
	sync.Mutex
}

func NewBundleExecer

func NewBundleExecer(config Configuration) *BundleExecer

func (*BundleExecer) ProcessInstructions

func (me *BundleExecer) ProcessInstructions(instructions *Instructions) error

type Configuration

type Configuration struct {
	AmqpQos          int
	AuthToken        string
	Binding          string
	ConnectionString string
	DisplayRev       bool
	DisplayVersion   bool
	Exchange         string
	ExitImmediately  bool
	GemDir           string
	GibHost          string
	Logger           gsmlog.GsmLogger
	Queue            string
	ScriptLoc        string
}

func NewConfigurationFromFlags

func NewConfigurationFromFlags() *Configuration

type Consumer

type Consumer struct {
	Configuration

	sync.Mutex
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(config Configuration) *Consumer

func (*Consumer) Consume

func (me *Consumer) Consume(deliveries chan interface{})

type Instructions

type Instructions struct {
	Rev       string `json:"rev"`
	RepoName  string `json:"repo_name"`
	RepoOwner string `json:"repo_owner"`
	AuthToken string
}

type Orchestrator

type Orchestrator struct {
	Configuration
}

func NewOrchestrator

func NewOrchestrator(config Configuration) *Orchestrator

func (*Orchestrator) Orchestrate

func (me *Orchestrator) Orchestrate(delivery amqp.Delivery) (*Instructions, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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