build

package
v2.16.4 Latest Latest
Warning

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

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

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 GenerateManifest added in v2.16.0

func GenerateManifest(root, language string) error

GenerateManifest writes the manifest file to a root driver directory.

func UpdateSDK added in v2.16.0

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 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 PrintfFunc added in v2.16.0

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 added in v2.16.0

type UpdateOptions struct {
	DryRun bool

	Debug   PrintfFunc
	Notice  PrintfFunc
	Warning PrintfFunc
}

UpdateOptions is a set of options available for

Jump to

Keyboard shortcuts

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