server

package
v0.16.14 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MPL-2.0 Imports: 22 Imported by: 4

Documentation

Overview

these are handlers that are passed into the util/notify/Watch command; they are called each time a file event happens

Index

Constants

This section is empty.

Variables

View Source
var (
	DisconnectedFromServer = errors.New("the server went away")
)

Functions

func Bootstrap

func Bootstrap(params string) error

Bootstrap issues a bootstrap to nanobox server

func Build

func Build(params string) error

Build issues a build to nanobox server

func Debug

func Debug(msg string)

Debug

func Deploy

func Deploy(params string) error

Deploy issues a deploy to nanobox server

func Error added in v0.16.7

func Error(msg, err string)

Error

func Exec

func Exec(where, params string) error

Exec

func Fatal

func Fatal(msg, err string)

Fatal

func Get

func Get(path string, v interface{}) (*http.Response, error)

Get issues a "GET" request to nanobox server at the specified path

func IsContainerExec

func IsContainerExec(args []string) bool

IsContainerExec

func Lock

func Lock()

Lock opens a 'lock' with the server; this is done so that nanobox can know how many clients are currenctly connected to the server

func Logs

func Logs(params string) error

Logs diplayes historical logs from the server

func NewLogger

func NewLogger(path string)

NewLogger sets the vagrant logger to the given path

func NotifyRebuild

func NotifyRebuild(event *fsnotify.Event) (err error)

NotifyRebuild

func NotifyServer

func NotifyServer(event *fsnotify.Event) error

NotifyServer

func Ping

func Ping() (bool, error)

Ping issues a ping to nanobox server

func Post

func Post(path, contentType string, body io.Reader) (*http.Response, error)

Post issues a "POST" to nanobox server

func Put

func Put(path string, body io.Reader) (*http.Response, error)

Put

func Suspend

func Suspend() error

Suspend

func Unlock

func Unlock()

Unlock closes the suspended 'lock' connection to the server indicating that a client has disconnected

func Update

func Update(params string) error

Update issues an update to nanobox server

Types

type Server

type Server interface {
	Bootstrap(params string) error
	Build(params string) error
	Deploy(params string) error
	Exec(where, params string) error
	IsContainerExec(args []string) (found bool)
	NotifyRebuild(event *fsnotify.Event) error
	NotifyServer(event *fsnotify.Event) error
	Lock()
	Unlock()
	NewLogger(path string)
	Logs(params string) error
	Ping() (bool, error)
	Get(path string, v interface{}) (*http.Response, error)
	Post(path, contentType string, body io.Reader) (*http.Response, error)
	Put(path string, body io.Reader) (*http.Response, error)
	Suspend() error
	Update(params string) error
}
var (
	Default Server = server{}
)

type Service

type Service struct {
	CreatedAt time.Time
	EnvVars   map[string]string
	IP        string
	Name      string
	Password  string
	Ports     []int
	Username  string
	UID       string
}

Service

type TimeoutReader added in v0.16.14

type TimeoutReader struct {
	Files chan string
	// contains filtered or unexported fields
}

A TimeoutReader reads from Files until timeout returning EOF

func (*TimeoutReader) Read added in v0.16.14

func (r *TimeoutReader) Read(p []byte) (n int, err error)

Read

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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