Versions in this module Expand all Collapse all v0 v0.7.1 Dec 6, 2013 Changes in this version + const StdWriterFdIndex + const StdWriterPrefixLen + const StdWriterSizeIndex + var ErrInvalidStdHeader = errors.New("Unrecognized input header") + var IAMSTATIC bool + var INITSHA1 string + func CatchAll(sigc chan os.Signal) — darwin/amd64, linux/amd64 + func CheckLocalDns(resolvConf []byte) bool + func CompareKernelVersion(a, b *KernelVersionInfo) int + func CopyDirectory(source, dest string) error + func CopyEscapable(dst io.Writer, src io.ReadCloser) (written int64, err error) + func CopyFile(src, dst string) (int64, error) + func CreatePidFile(pidfile string) error + func Debugf(format string, a ...interface{}) + func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool) error + func DockerInitPath(localCopy string) string + func Download(url string) (*http.Response, error) + func Errorf(format string, a ...interface{}) + func FindCgroupMountpoint(cgroupType string) (string, error) + func GetCallerName(depth int) string + func GetNameserversAsCIDR(resolvConf []byte) []string + func GetReleaseVersion() string + func GetResolvConf() ([]byte, error) + func GetTotalUsedFds() int + func Go(f func() error) chan error + func HashData(src io.Reader) (string, error) + func HumanDuration(d time.Duration) string + func HumanSize(size int64) string + func IsClosedError(err error) bool + func IsGIT(str string) bool + func IsURL(str string) bool + func NewBufReader(r io.Reader) *bufReader + func NewHTTPRequestError(msg string, res *http.Response) error + func NopWriteCloser(w io.Writer) io.WriteCloser + func ParseHost(host string, port int, addr string) (string, error) + func ParseRepositoryTag(repos string) (string, string) + func PartParser(template, data string) (map[string]string, error) + func ProgressReader(r io.ReadCloser, size int, output io.Writer, sf *StreamFormatter, newline bool, ...) *progressReader + func RAMInBytes(size string) (bytes int64, err error) + func RandomString() string + func RemovePidFile(pidfile string) + func SelfPath() string + func ShellQuoteArguments(args []string) string + func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error) + func StopCatch(sigc chan os.Signal) + func StripComments(input []byte, commentMarker []byte) []byte + func TestDirectory(templateDir string) (dir string, err error) + func TreeSize(dir string) (size int64, err error) + func Trunc(s string, maxlen int) string + func TruncateID(id string) string + type DependencyGraph struct + func NewDependencyGraph() DependencyGraph + func (graph *DependencyGraph) AddDependency(node, to string) error + func (graph *DependencyGraph) GenerateTraversalMap() ([][]string, error) + func (graph *DependencyGraph) NewNode(id string) string + type DependencyNode struct + func (node *DependencyNode) Degree() int + type Fataler interface + Fatal func(args ...interface{}) + type HTTPAuthDecorator struct + func (self *HTTPAuthDecorator) ChangeRequest(req *http.Request) (*http.Request, error) + type HTTPMetaHeadersDecorator struct + Headers map[string][]string + func (h *HTTPMetaHeadersDecorator) ChangeRequest(req *http.Request) (newReq *http.Request, err error) + type HTTPRequestDecorator interface + ChangeRequest func(req *http.Request) (newReq *http.Request, err error) + func NewHTTPAuthDecorator(login, password string) HTTPRequestDecorator + func NewHTTPUserAgentDecorator(versions ...VersionInfo) HTTPRequestDecorator + type HTTPRequestFactory struct + func NewHTTPRequestFactory(d ...HTTPRequestDecorator) *HTTPRequestFactory + func (h *HTTPRequestFactory) NewRequest(method, urlStr string, body io.Reader, d ...HTTPRequestDecorator) (*http.Request, error) + func (self *HTTPRequestFactory) AddDecorator(d ...HTTPRequestDecorator) + type HTTPUserAgentDecorator struct + func (h *HTTPUserAgentDecorator) ChangeRequest(req *http.Request) (newReq *http.Request, err error) + type JSONError struct + Code int + Message string + func (e *JSONError) Error() string + type JSONLog struct + Created time.Time + Log string + Stream string + type JSONMessage struct + Error *JSONError + ErrorMessage string + From string + ID string + Progress *JSONProgress + ProgressMessage string + Status string + Time int64 + func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error + type JSONProgress struct + Current int + Start int64 + Total int + func (p *JSONProgress) String() string + type KernelVersionInfo struct + Flavor string + Kernel int + Major int + Minor int + func GetKernelVersion() (*KernelVersionInfo, error) + func ParseRelease(release string) (*KernelVersionInfo, error) + func (k *KernelVersionInfo) String() string + type NopFlusher struct + func (f *NopFlusher) Flush() + type NopWriter struct + func (*NopWriter) Write(buf []byte) (int, error) + type StatusError struct + Status string + StatusCode int + func (e *StatusError) Error() string + type StdType [StdWriterPrefixLen]byte + var Stderr StdType = StdType{ ... } + var Stdin StdType = StdType{ ... } + var Stdout StdType = StdType{ ... } + type StdWriter struct + func NewStdWriter(w io.Writer, t StdType) *StdWriter + func (w *StdWriter) Write(buf []byte) (n int, err error) + type StreamFormatter struct + func NewStreamFormatter(json bool) *StreamFormatter + func (sf *StreamFormatter) FormatError(err error) []byte + func (sf *StreamFormatter) FormatProgress(id, action string, progress *JSONProgress) []byte + func (sf *StreamFormatter) FormatStatus(id, format string, a ...interface{}) []byte + func (sf *StreamFormatter) Used() bool + type StreamWriter struct + type TarSum struct + func (ts *TarSum) Read(buf []byte) (int, error) + func (ts *TarSum) Sum(extra []byte) string + type TruncIndex struct + func NewTruncIndex() *TruncIndex + func (idx *TruncIndex) Add(id string) error + func (idx *TruncIndex) Delete(id string) error + func (idx *TruncIndex) Get(s string) (string, error) + type User struct + Gid string + HomeDir string + Name string + Uid string + Username string + func UserLookup(uid string) (*User, error) + type Utsname struct — darwin/amd64 + Release [65]byte + type Utsname syscall.Utsname — linux/amd64 + type VersionInfo interface + Name func() string + Version func() string + type WriteBroadcaster struct + func NewWriteBroadcaster() *WriteBroadcaster + func (w *WriteBroadcaster) AddWriter(writer io.WriteCloser, stream string) + func (w *WriteBroadcaster) CloseWriters() error + func (w *WriteBroadcaster) Write(p []byte) (n int, err error) + type WriteFlusher struct + func NewWriteFlusher(w io.Writer) *WriteFlusher + func (wf *WriteFlusher) Flush() + func (wf *WriteFlusher) Write(b []byte) (n int, err error)