Documentation
¶
Index ¶
Constants ¶
const ( DriverLoading = iota DriverReloading DriverAlive DriverFailed )
DriverStates represents driver states.
Variables ¶
var BuiltinPath string
BuiltinPath is the path where the builtin drivers are kept. It will try using $HONEYDIPPER_DRIVERS_BUILTIN by default. If $HONEYDIPPER_DRIVERS_BUILTIN is not set, will try using $GOPATH/bin. If $GOPATH is not defined, use "/opt/honeydipper/driver/builtin".
Functions ¶
This section is empty.
Types ¶
type BuiltinDriver ¶ added in v0.1.8
type BuiltinDriver struct {
// contains filtered or unexported fields
}
BuiltinDriver are compiled and delivered with daemon binary in the same container image
func NewBuiltinDriver ¶ added in v0.1.8
func NewBuiltinDriver(m *Meta) *BuiltinDriver
NewBuiltinDriver creates a handler for the builtin driver specified in the meta info.
func (*BuiltinDriver) Acquire ¶ added in v0.1.8
func (d *BuiltinDriver) Acquire()
Acquire function is used for getting the driver from sources and validate, for builtin drivers, just make sure the name is valid.
func (*BuiltinDriver) Meta ¶ added in v0.1.8
func (d *BuiltinDriver) Meta() *Meta
Meta function exposes the metadata used for this driver handler
func (*BuiltinDriver) Prepare ¶ added in v0.1.8
func (d *BuiltinDriver) Prepare()
Prepare function is used for preparing the arguments when calling the executable for the driver.
type Handler ¶
type Handler interface { Acquire() Prepare() Meta() *Meta }
Handler provides common functions for handling a driver
type Meta ¶ added in v0.1.8
type Meta struct { Name string Type string Executable string Arguments []string HandlerData map[string]interface{} }
Meta holds the meta information about the driver itself.
type Runtime ¶
type Runtime struct { Data interface{} DynamicData interface{} Feature string Stream chan dipper.Message Input io.ReadCloser Output io.WriteCloser Service string Run *exec.Cmd State int Handler Handler }
Runtime contains the runtime information of the running driver.
func (*Runtime) SendMessage ¶
SendMessage sentds a dipper message to the driver child process.
func (*Runtime) SendOptions ¶
func (runtime *Runtime) SendOptions()
SendOptions sends driver options and data to the child process as a dipper message.