cmd

package
v0.0.0-...-8428bab Latest Latest
Warning

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

Go to latest
Published: May 22, 2015 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AmqpChannel

func AmqpChannel(url string) (ch *amqp.Channel)

AmqpChannel is the same as amqpConnect in boulder, but with even more aggressive error dropping

func FailOnError

func FailOnError(err error, msg string)

FailOnError exits and prints an error message if we encountered a problem

func LoadCert

func LoadCert(path string) (cert []byte, err error)

func ProfileCmd

func ProfileCmd(profileName string, stats statsd.Statter)

func RunForever

func RunForever(server *rpc.AmqpRPCServer)

RunForever starts the server and wait around

func RunUntilSignaled

func RunUntilSignaled(logger *blog.AuditLogger, server *rpc.AmqpRPCServer, closeChan chan *amqp.Error)

RunUntilSignaled starts the server and run until we get something on closeChan

Types

type AppShell

type AppShell struct {
	Action func(Config)
	// contains filtered or unexported fields
}

AppShell contains CLI Metadata

func NewAppShell

func NewAppShell(name string) (shell *AppShell)

NewAppShell creates a basic AppShell object containing CLI metadata

func (*AppShell) Run

func (as *AppShell) Run()

Run begins the application context, reading config and passing control to the default commandline action.

type Config

type Config struct {
	// General
	AMQP struct {
		Server string
		RA     QueuePair
		VA     QueuePair
		SA     QueuePair
		CA     QueuePair
	}

	WFE struct {
		BaseURL       string
		ListenAddress string
	}

	CA ca.Config

	SA struct {
		DBDriver string
		DBName   string
	}

	Statsd struct {
		Server string
		Prefix string
	}

	Syslog struct {
		Network string
		Server  string
		Tag     string
	}

	Mail struct {
		Server   string
		Port     string
		Username string
		Password string
	}

	SubscriberAgreementURL string
}

Config stores configuration parameters that applications will need. For simplicity, we just lump them all into one struct, and use encoding/json to read it from a file.

Note: NO DEFAULTS are provided.

type QueuePair

type QueuePair struct {
	Client string
	Server string
}

QueuePair describes a client-server pair of queue names

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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