shell

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Launch

func Launch(c *cli.Context)

Launch SensorBee's command line client tool.

func SetUp

func SetUp() cli.Command

SetUp SensorBee shell tool. The tool sets up HTTP client and access to SensorBee server.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is the application server of SensorBee.

func SetUpCommands

func SetUpCommands(commands []Command) App

SetUpCommands set up application. Commands are initialized with it.

func (*App) Run

func (a *App) Run(requester *client.Requester)

Run begins SensorBee command line tool to management SensorBee and execute BQL/UDF/UDTF statements.

type Command

type Command interface {
	// Init the command. Returns error if the command initialize is failed.
	Init() error

	// Name returns the names of the command. Users can execute the command
	// function by inputting these names.
	Name() []string

	// Input commands to buffer. If commands are completed, returns that
	// cmdInputStatusType is preparedCMD, and commands are on the way,
	// returns that cmdInputStatusType is continuousCMD.
	// Returns error when the input commands are invalid.
	Input(input string) (cmdInputStatusType, error)

	// Eval executes the command.
	Eval(requester *client.Requester)
}

Command is the interface to management SensorBee.

func NewFileLoadCommands

func NewFileLoadCommands() []Command

NewFileLoadCommands returns command list to load BQL file.

func NewTopologiesCommands

func NewTopologiesCommands() []Command

NewTopologiesCommands returns command list to execute BQL statement.

Jump to

Keyboard shortcuts

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