build

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: GPL-3.0 Imports: 29 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ScriptName = dockerFileName
)

Variables

View Source
var ErrChangesRequired = errors.New("changes are required")

ErrChangesRequired is returned by UpdateSDK in DryRun mode when changes are required.

Functions

func InitDriver

func InitDriver(root, language string, opt *InitOptions) error

InitDriver initializes a new driver in the specified root driver directory.

func UpdateSDK

func UpdateSDK(root string, opt *UpdateOptions) error

UpdateSDK updates SDK-managed files for the driver located at root.

If DryRun option is set, the function would not update any files, and instead will return ErrChangesRequired if there are any changes required.

func Verbose

func Verbose() bool

Types

type Cmd

type Cmd struct {
	*exec.Cmd
}

func (Cmd) Run

func (c Cmd) Run() error

type Driver

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

func NewDriver

func NewDriver(path string) (*Driver, error)

func (*Driver) Build

func (d *Driver) Build(imageName string) (string, error)

func (*Driver) FillManifest

func (d *Driver) FillManifest(dest string) error

func (*Driver) Prepare

func (d *Driver) Prepare() (bool, error)

func (*Driver) Push

func (d *Driver) Push(image string) error

func (*Driver) ScriptChanged

func (d *Driver) ScriptChanged() (bool, error)

func (*Driver) Test

func (d *Driver) Test(bblfshdVers, image string, bench bool) error

func (*Driver) VersionTag

func (d *Driver) VersionTag() (string, error)

type InitOptions

type InitOptions struct {
	Debug   PrintfFunc
	Notice  PrintfFunc
	Warning PrintfFunc
}

InitOptions is a set of options available for the driver init.

type PrintfFunc

type PrintfFunc func(format string, args ...interface{}) (int, error)

PrintfFunc is a logging function type similar to log.Printf.

type ServerInstance

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

func RunWithDriver

func RunWithDriver(bblfshdVers, lang, id string) (*ServerInstance, error)

RunWithDriver starts a bblfshd server and installs a specified driver to it.

func (*ServerInstance) ClientV1

func (*ServerInstance) ClientV2

func (d *ServerInstance) ClientV2(ctx context.Context) (driver.Driver, error)

func (*ServerInstance) Close

func (d *ServerInstance) Close() error

func (*ServerInstance) DumpLogs

func (s *ServerInstance) DumpLogs(w io.Writer) error

type UpdateOptions

type UpdateOptions struct {
	DryRun bool

	Debug   PrintfFunc
	Notice  PrintfFunc
	Warning PrintfFunc
}

UpdateOptions is a set of options available for the driver update.

Jump to

Keyboard shortcuts

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