shell

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 14 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdFlags = []cli.Flag{
	cli.StringFlag{
		Name:   "uri",
		Value:  fmt.Sprintf("http://localhost:%d/", config.DefaultPort),
		Usage:  "the address of the target SensorBee server",
		EnvVar: "SENSORBEE_URI",
	},
	cli.StringFlag{
		Name:  "api-version",
		Value: "v1",
		Usage: "target API version",
	},
	cli.StringFlag{
		Name:  "topology,t",
		Usage: "the SensorBee topology to use (instead of USE command)",
	},
}

CmdFlags is list of shell command options

Functions

func Launch

func Launch(c *cli.Context) error

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