Documentation
¶
Index ¶
Constants ¶
View Source
const ( // GlobalConfigDirKey is the key for reco configuration in viper. GlobalConfigDirKey = "reco_global_config_dir" // ConfigDirKey is the key for reco configuration for current directory. ConfigDirKey = "reco_config_dir" StatusWaiting = "WAITING" JobTypeBuild = "build" JobTypeDeployment = "deployment" JobTypeSimulation = "simulation" JobTypeGraph = "graph" )
Variables ¶
View Source
var ( // StatusSubmitted is submitted job state. StatusSubmitted = "SUBMITTED" // StatusQueued is queued job state. StatusQueued = "QUEUED" // StatusCreatingImage is creating image job state. StatusCreatingImage = "CREATING_IMAGE" // StatusStarted is started job state. StatusStarted = "STARTED" // StatusTerminating is terminating job state. StatusTerminating = "TERMINATING" // StatusTerminated is terminated job state. StatusTerminated = "TERMINATED" // StatusCompleted is completed job state. StatusCompleted = "COMPLETED" // StatusErrored is errored job state. StatusErrored = "ERRORED" // An error event with code value 124 indicates timeout StatusTimeout = "TIMED-OUT" // An error event with Code value 124 indicates timeout ErrorCodeTimeout = 124 )
View Source
var (
ErrNotFound = errors.New("Not found")
)
Functions ¶
func Bool ¶
func Bool(v interface{}) bool
Bool returns bool value of v if v is a bool, or false otherwise.
func String ¶
func String(v interface{}) string
String returns string value of v if v is a string, or "" otherwise.
func StringSlice ¶
func StringSlice(v interface{}) []string
StringSlice returns strings slice of v if v is a string slice, otherwise returns nil.
Types ¶
type Args ¶
type Args []interface{}
Args is convenience wrapper for []interface to fetch element at without wrong index errors.
type BuildReporter ¶ added in v0.6.0
type BuildReporter interface {
// Report returns a formatted JSON build report.
Report(id string) (string, error)
}
BuildReporter can return build reports.
type Client ¶
type Client interface {
// Init initiates the client.
Init() error
// Auth authenticates the user.
Auth(token string) error
// Test handles simulation actions.
Test() Job
// Build handles build actions.
Build() Job
// Deployment handles deployment actions.
Deployment() Job
// Project handles project actions.
Project() ProjectConfig
// Graph handles graph actions.
Graph() Graph
}
Client is a reconfigure.io platform client.
type DeploymentProxy ¶
type DeploymentProxy interface {
// Connect performs a proxy connection.
Connect(id string, openBrowser bool) error
}
DeploymentProxy proxies to a running deployment instance.
type Endpoint ¶
type Endpoint string
Endpoint is reco client api endpoint.
type Graph ¶
type Graph interface {
// Generate generates a graph.
Generate(Args) (output string, err error)
// List list graphs.
List(filter M) (printer.Table, error)
// Open opens a graph.
Open(id string) (file string, err error)
}
Graph manages reco graphs.
type Job ¶
type Job interface {
// Start starts the job.
Start(Args) (output string, err error)
// Stop stops the job.
Stop(id string) error
// Status returns the status of the job.
Status(id string) string
// List lists job resources.
List(filter M) (printer.Table, error)
// Log logs the job.
Log(id string, writer io.Writer) error
}
Job is a set of actions for the reco platform.
type ProjectConfig ¶
type ProjectConfig interface {
// List lists the projects.
List(filter M) (printer.Table, error)
// Create create a new project.
Create(name string) error
// Set sets the active project.
Set(name string) error
// Get gets the name of the active project.
Get() (string, error)
// contains filtered or unexported methods
}
ProjectConfig manages projects.
type ProjectInfo ¶
ProjectInfo gives information about a project.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.