Documentation

Overview

    Package boxutil provides some helpful utilities for consuming Machine Box services.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func IsReady

    func IsReady(status string) bool

      IsReady gets whether the box info status is ready or not.

      func StatusChan

      func StatusChan(ctx context.Context, i Box) <-chan string

        StatusChan gets a channel that periodically gets the box info and sends a message whenever the status changes.

        func WaitForReady

        func WaitForReady(ctx context.Context, i Box) error

          WaitForReady blocks until the Box is ready.

          Types

          type Box

          type Box interface {
          	Info() (*Info, error)
          }

            Box represents a box client capable of returning Info.

            type Info

            type Info struct {
            	Name    string
            	Version int
            	Build   string
            	Status  string
            }

              Info describes box information.