Documentation ¶
Index ¶
- Variables
- func Ask(question string) (string, error)
- func BadPortType(protocol string)
- func BadTerminal()
- func CloseContext() error
- func CommandErr(err error)
- func ConsoleLocalCode()
- func ConsoleNodeNotFound()
- func Debug(message string, args ...interface{}) error
- func DeployComplete()
- func DevRunEmpty()
- func Error(message string, args ...interface{}) error
- func ErrorTask() error
- func FirstBuild()
- func FirstDeploy()
- func FormatLogMessage(msg mist.Message, showTimestamp bool)
- func FormatLogvacMessage(msg logvac.Message, showTimestamp bool)
- func Info(message string, args ...interface{}) error
- func InfoDevContainer(ip string)
- func InfoDevRunContainer(cmd, ip string)
- func InfoLocalContainer()
- func InfoProductionContainer()
- func InfoProductionHost()
- func InfoSimDeploy(ip string)
- func InvalidBoxfile()
- func LocalEngineNotFound()
- func LoginComplete()
- func LoginRequired()
- func MOTD()
- func MigrateOldRequired()
- func MigrateProviderRequired()
- func MissingBoxfile()
- func MissingDependencies(provider string, missingParts []string)
- func NetworkCreateError(name, network string)
- func NoGonanaUser()
- func OpenContext(format string, args ...interface{}) error
- func PauseTask()
- func PortInUse(port string)
- func PortPrivileged(port string)
- func PrintRequiresPrivilege(reason string)
- func ProviderSetup()
- func ReadPassword(label string) (string, error)
- func ReadUsername() (string, error)
- func ResumeTask()
- func StartTask(format string, args ...interface{}) error
- func StopTask() error
- func TooManyKeys()
- func Trace(message string, args ...interface{}) error
- func TunnelEstablished(component, port string)
- func UnexpectedPrivilage()
- func VMCommunicationError()
- func Warn(message string, args ...interface{}) error
- func WorldWritable()
- type Details
- type DockerPercentDisplay
- type DockerPercentPart
- type DownloadPercent
- type Entry
- type Prefixer
- type Status
- type Streamer
- type Summarizer
Constants ¶
This section is empty.
Variables ¶
var ( TaskSpinner = []string{"⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾"} TaskComplete = "✓" TaskPause = "*" )
...
var ( // Log - enable logging to a file Log = true // LogFile - the location of logfile LogFile = filepath.ToSlash(filepath.Join(config.GlobalDir(), "process.log")) // Summary - summarize the output and hide log details Summary = true // Interactive - re-draw the summary when updates occur Interactive = terminal.IsTerminal(int(os.Stderr.Fd())) // Level - info, warn, error, debug, trace Level = "info" // Mode - text, json Mode = "text" // Out - writer to send output to Out io.Writer = os.Stdout )
var ( EscSeqRegex = regexp.MustCompile("\\x1b[[][?0123456789]*;?[?0123456789]*[ABEFHJRSTfminsulhp]") LogStripRegex = regexp.MustCompile("^[ \t-]*") )
...
var (
CmdErrRegex = regexp.MustCompile(":\\s?$")
)
Functions ¶
func BadPortType ¶
func BadPortType(protocol string)
func BadTerminal ¶
func BadTerminal()
func CloseContext ¶
func CloseContext() error
CloseContext closes the context level and prints a newline
func CommandErr ¶
func CommandErr(err error)
CommandErr ...
We hit a minor bump, which can be quickly resolved following the instructions above. If not, come talk and we'll walk you through the resolution.
func ConsoleLocalCode ¶
func ConsoleLocalCode()
func ConsoleNodeNotFound ¶
func ConsoleNodeNotFound()
func DeployComplete ¶
func DeployComplete()
func DevRunEmpty ¶
func DevRunEmpty()
func FirstBuild ¶
func FirstBuild()
func FirstDeploy ¶
func FirstDeploy()
func FormatLogMessage ¶
func FormatLogMessage(msg mist.Message, showTimestamp bool)
FormatLogMessage takes a Logvac/Mist and formats it into a pretty message to be output to the terminal
func FormatLogvacMessage ¶
func FormatLogvacMessage(msg logvac.Message, showTimestamp bool)
FormatLogvacMessage takes a Logvac/Mist and formats it into a pretty message to be output to the terminal
func InfoDevContainer ¶
func InfoDevContainer(ip string)
func InfoDevRunContainer ¶
func InfoDevRunContainer(cmd, ip string)
func InfoLocalContainer ¶
func InfoLocalContainer()
func InfoProductionContainer ¶
func InfoProductionContainer()
func InfoProductionHost ¶
func InfoProductionHost()
func InfoSimDeploy ¶
func InfoSimDeploy(ip string)
func InvalidBoxfile ¶
func InvalidBoxfile()
func LocalEngineNotFound ¶
func LocalEngineNotFound()
func LoginComplete ¶
func LoginComplete()
func LoginRequired ¶
func LoginRequired()
func MigrateOldRequired ¶
func MigrateOldRequired()
func MigrateProviderRequired ¶
func MigrateProviderRequired()
func MissingBoxfile ¶
func MissingBoxfile()
func MissingDependencies ¶
func NetworkCreateError ¶
func NetworkCreateError(name, network string)
func NoGonanaUser ¶
func NoGonanaUser()
func OpenContext ¶
OpenContext opens a context level and prints the header
func PortPrivileged ¶
func PortPrivileged(port string)
func PrintRequiresPrivilege ¶
func PrintRequiresPrivilege(reason string)
PrintRequiresPrivilege prints a message informing privilege escalation is required
func ProviderSetup ¶
func ProviderSetup()
func ReadPassword ¶
ReadPassword reads a password from the terminal and masks the input
func ResumeTask ¶
func ResumeTask()
ResumeTask resumes the summarizer, so output is swallowed unless `-v` is passed.
func TooManyKeys ¶
func TooManyKeys()
func TunnelEstablished ¶
func TunnelEstablished(component, port string)
func UnexpectedPrivilage ¶
func UnexpectedPrivilage()
func VMCommunicationError ¶
func VMCommunicationError()
func WorldWritable ¶
func WorldWritable()
Types ¶
type DockerPercentDisplay ¶
type DockerPercentDisplay struct { Output io.Writer Prefix string // contains filtered or unexported fields }
DockerPercentDisplay ...
type DockerPercentPart ¶
type DockerPercentPart struct {
// contains filtered or unexported fields
}
DockerPercentPart ...
type DownloadPercent ¶
type DownloadPercent struct { Total int64 Output io.Writer // contains filtered or unexported fields }
func (*DownloadPercent) SimpleDisplay ¶
func (dp *DownloadPercent) SimpleDisplay()
func (*DownloadPercent) UpdateDisplay ¶
func (dp *DownloadPercent) UpdateDisplay()
type Entry ¶
type Entry struct { Time time.Time `json:"time"` // "2016-09-07T20:33:34.446275741Z" UTime int `json:"utime"` // 1473280414446275741 ID string `json:"id"` // "mist" Tag []string `json:"tag"` // ["mist[daemon]", "mist"] Type string `json:"type"` // "app" Priority int `json:"priority"` // 4 Message string `json:"message"` // "2016-09-07T20:33:34.44586 2016-09-07 20:33:34 INFO Api Listening on https://0.0.0.0:6361..." }
Entry represents the data comming back from a mist message (mist.Message.Data)
type Status ¶
type Status struct { Status string `json:"status,omitempty"` ID string `json:"id,omitempty"` Details Details `json:"progressDetail"` }
Status ... {"status":"Downloading","progressDetail":{"current":676,"total":755},"progress":"[============================================\u003e ] 676 B/755 B","id":"166102ec41af"}
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer ...
func NewPrefixedStreamer ¶
NewPrefixedStreamer returns a new Streamer with a Prefixer
func (*Streamer) CaptureOutput ¶
CaptureOutput will write messages to the message var.
type Summarizer ¶
type Summarizer struct { Label string // the task label to print as the header Prefix string // the prefix to prepend to the summary Out io.Writer // writer to send output to // contains filtered or unexported fields }
Summarizer ...
func NewSummarizer ¶
func NewSummarizer(label string, prefix string) *Summarizer
NewSummarizer returns a new Summarizer
func (*Summarizer) Error ¶
func (s *Summarizer) Error()
Error will stop the summary process and print an error header
func (*Summarizer) Log ¶
func (s *Summarizer) Log(msg string)
Log sends a log message to the summary process
func (*Summarizer) Resume ¶
func (s *Summarizer) Resume()
Resume prints the "complete" label and toggles shutdown
func (*Summarizer) Start ¶
func (s *Summarizer) Start()
Start starts the summary process in a goroutine