program

package
v0.0.0-...-6ad1837 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServices

func GetServices() []string

GetServices returns a string list of the available program services.

Types

type Service

type Service interface {
	// Compile compiles a source code file to a binary file.
	Compile(ctx context.Context, sourceRelativePath, binaryRelativePath string) error

	// GetExecutionCommand returns an *exec.Cmd to execute the given program.
	GetExecutionCommand(ctx context.Context, sourceRelativePath, binaryRelativePath string) *exec.Cmd

	// GetSourceFileExtension returns the extension for source code files names.
	GetSourceFileExtension() string

	// GetBinaryFileExtension returns the extension for binary executable file names.
	GetBinaryFileExtension() string
}

Service provides methods to compile and execute programs.

func NewService

func NewService(serviceKey string, runtime serviceRuntime) (Service, error)

NewService creates a Service according to the given key. If nil is passed, the Service will be created with the default serviceRuntime.

Jump to

Keyboard shortcuts

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