client

package
v2.90.1-0...-9a7c53c Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	GUID              string
	Name              string
	URLs              []string
	Instances         int
	RunningInstances  *int
	Version           string
	Buildpack         string
	DetectedBuildpack string
	Memory            int
	DiskQuota         int
}

type AppLogLine

type AppLogLine struct {
	Text          string `json:"text"`
	Source        string `json:"source"`
	Filename      string `json:"filename"`
	InstanceIndex int    `json:"instance"`
	Timestamp     int64  `json:"timestamp"`
	NodeID        string `json:"nodeid"`
}

type CliClient

type CliClient struct {
	TargetURL string
	Token     string
	Space     string
}

func NewCliClient

func NewCliClient(targetUrl, token, space string) (*CliClient, error)

func (*CliClient) PushAppNoCreate

func (c *CliClient) PushAppNoCreate(name string, dir string, autoStart bool, outputCh chan string) (bool, error)

PushAppNoCreate emulates `s push ...` and sends the output in outputCh channel.

type Client

type Client interface {
	PushApp(name string, dir string) error
}

type RestClient

type RestClient struct {
	TargetURL string
	Token     string
	Space     string
	// contains filtered or unexported fields
}

func NewRestClient

func NewRestClient(targetUrl, token, space string) *RestClient

func (*RestClient) CreateApp

func (c *RestClient) CreateApp(name string, memory int) (string, error)

CreateApp only creates the application. It is an equivalent of `s create-app --json`.

func (*RestClient) GetLogs

func (c *RestClient) GetLogs(appGUID string, num int) ([]AppLogLine, error)

func (*RestClient) GetLogsRaw

func (c *RestClient) GetLogsRaw(appGUID string, num int) ([]string, error)

func (*RestClient) ListApps

func (c *RestClient) ListApps() (apps []App, err error)

func (*RestClient) MakeRequest

func (c *RestClient) MakeRequest(method string, path string, params interface{}, response interface{}) error

Jump to

Keyboard shortcuts

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