mist

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2015 License: MPL-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapUpdates

func BootstrapUpdates(status string) (err error)

BootstrapUpdates

func BuildUpdates

func BuildUpdates(status string) (err error)

BuildUpdates receives a status update from mist.go and determines what to do based on the status. By default it will return, indicating to mist to stop listening.

func DeployUpdates

func DeployUpdates(status string) (err error)

DeployUpdates

func ImageUpdates

func ImageUpdates(status string) (err error)

ImageUpdates

func Listen

func Listen(tags []string, handle func(string) error) error

Listen connects a to mist, subscribes tags, and listens for 'model' updates

func PrintLogStream

func PrintLogStream(log Log)

PrintLogStream prints a message received as is

func ProcessLog

func ProcessLog(log Log)

ProcessLog takes a Logvac or Stormpack log and breaks it apart into pieces that are then reconstructed in a 'digestible' way, colorized, and output to the terminal

func ProcessLogStream

func ProcessLogStream(log Log)

ProcessLogStream processes a log before printing it; if the CLI is silenced don't process any logs

func Stream

func Stream(tags []string, handle func(Log))

Stream connects to mist, subscribes tags, and logs Messages

Types

type Log

type Log struct {
	Content  string `json:"content"`
	Priority int    `json:"priority"`
	Time     string `json:"time"`
	Type     string `json:"type"`
}

Log

type Mist

type Mist interface {
	Listen(tags []string, handle func(string) error) error
	Stream(tags []string, handle func(Log))
	ProcessLog(log Log)
	DeployUpdates(status string) (err error)
	BuildUpdates(status string) (err error)
	BootstrapUpdates(status string) (err error)
	ImageUpdates(status string) (err error)
	PrintLogStream(log Log)
	ProcessLogStream(log Log)
}
var (
	Default Mist = mist{}
)

type Model

type Model struct {
	Action   string `json:"action"`
	Document struct {
		ID     string `json:"id"`
		Status string `json:"status"`
	} `json:"document"`
	Name string `json:"model"`
}

Model

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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