builder

package
v0.0.0-...-932d068 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool

	Root string

	GRPC struct {
		Address  string
		UID, GID int
	}
	ContainerdWorker struct {
		Address     string
		Namespace   string
		Snapshotter string
	}
}

Config is used to set up builder.

type Options

type Options struct {
	Config Config

	// PostImageExportFunc allows to do post check or post action
	// after exporter.
	//
	// TODO(fuweid): Since we caches containerd image in our own, pouch
	// images command won't get the new image exported by buildkit if
	// we don't store it in the cache. The post check is used to
	// save the cache in local. I think we should remove this option
	// after we remove the cache.
	PostImageExportFunc func(context.Context, map[string]string) error
}

Options is used to config the BuilderServer.

type Server

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

Server wrappers buildkit to provide builder functionality.

func New

func New(opts *Options) (*Server, error)

New returns Server.

TODO(fuweid):

  1. supports network mode in containerd worker.
  2. supports cpu/memory limitation in containerd worker.
  3. supports registry cache.
  4. use runC/PouchContainer's container mgr to run the container container for build is not created by PouchContainer's ContainerMgr and the exit event will be filed to PouchContainer which has no idea about this. The error log will be annoying.

func (*Server) Serve

func (bs *Server) Serve() error

Serve starts the Server.

func (*Server) Stop

func (bs *Server) Stop()

Stop the Server.

Jump to

Keyboard shortcuts

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