build

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package build contains utils for egbuilder build command.

Package build contains utils for egbuilder build command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, config *Config) error

Build builds Easegress with custom plugins.

func Run

func Run(ctx context.Context, runner *Runner) error

Run runs the easegress-server with plugins in current directory.

Types

type Compile

type Compile struct {
	OS   string `json:"os,omitempty"`
	Arch string `json:"arch,omitempty"`
	ARM  string `json:"arm,omitempty"`
	Cgo  bool   `json:"cgo,omitempty"`
}

Compile contains parameters for compilation.

func (Compile) CgoEnabled

func (c Compile) CgoEnabled() string

CgoEnabled returns "1" if c.Cgo is true, "0" otherwise. This is used for setting the CGO_ENABLED env variable.

type Config

type Config struct {
	Options `json:",inline"`

	Plugins []*Plugin `json:"plugins"`
	Output  string    `json:"output"`
}

func NewConfig

func NewConfig(filename string) (*Config, error)

func (*Config) Init

func (config *Config) Init() error

Init initializes the config. When use NewConfig, Init will be called automatically.

type Options

type Options struct {
	Compile Compile `json:"compile"`

	EGVersion    string `json:"egVersion"`
	RaceDetector bool   `json:"raceDetector"`
	SkipBuild    bool   `json:"skipBuild"`
	SkipCleanup  bool   `json:"skipCleanup"`

	BuildFlags []string `json:"buildFlags"`
	ModFlags   []string `json:"modFlags"`
}

type Plugin

type Plugin struct {
	Module      string `json:"module"`
	Version     string `json:"version"`
	Replacement string `json:"replacement"`
}

Plugin contains parameters for a plugin.

type Runner

type Runner struct {
	Options      `json:",inline"`
	EgServerArgs []string `json:"egServerArgs"`
	// contains filtered or unexported fields
}

Runner is the runner of easegress-server. It is used to build and run easegress-server.

func NewRunner

func NewRunner(filename string) (*Runner, error)

NewRunner creates a new runner.

Jump to

Keyboard shortcuts

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