adapter

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const GC_CACHE_PATH = "native-cache"
View Source
const GO_MOD_TEMPLATE = `` /* 369-byte string literal not displayed */
View Source
const MAX_COMPILATION_TIME = 30 * time.Second
View Source
const MAX_WARM_UP_COMPILATION_TIME = 45 * time.Second

in a poor CPU environment when we have many containers starting up in the same time (usually on our CI) or when running Docker e2e locally We almost always end up with CPU starvation when the warm up compilation occurs

(Due to all containers executing a "go build ..." shell at the same time.

Setting a higher time simply solves this issue and prevent a lot of side effects from happening.

View Source
const SHARED_OBJECT_PATH = "native-bin"
View Source
const SOURCE_CODE_PATH = "native-src"

Variables

View Source
var LogTag = log.String("adapter", "processor-native")

Functions

func WriteArtifactsGoModToDisk added in v1.3.14

func WriteArtifactsGoModToDisk(targetFilePath string, versions config.ArtifactsDependencyVersions) error

Types

type Compiler

type Compiler interface {
	Compile(ctx context.Context, code ...string) (*sdkContext.ContractInfo, error)
}

func NewNativeCompiler

func NewNativeCompiler(config Config, parent log.Logger, factory metric.Factory) Compiler

type Config

type Config interface {
	ProcessorArtifactPath() string
	ProcessorPerformWarmUpCompilation() bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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