server

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 129 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPlatforms added in v0.11.8

func FormatPlatforms(p []ocispecs.Platform) []string

Types

type ClientInitOpts added in v0.11.8

type ClientInitOpts struct {
	*engine.ClientMetadata

	// If the client is running from a function in a module, this is the encoded dagQL ID
	// of that module.
	EncodedModuleID string

	// If the client is running from a function in a module, this is the encoded function call
	// metadata (of type core.FunctionCall)
	EncodedFunctionCall json.RawMessage
}

type NewServerOpts added in v0.11.8

type NewServerOpts struct {
	Config *config.Config
	Name   string

	TelemetryPubSub *enginetel.PubSub
}

type Server added in v0.11.8

type Server struct {
	SolverCache daggercache.Manager
	// contains filtered or unexported fields
}

func NewServer added in v0.11.8

func NewServer(ctx context.Context, opts *NewServerOpts) (*Server, error)

func (*Server) Close added in v0.11.8

func (srv *Server) Close() error

func (*Server) CurrentFunctionCall added in v0.11.8

func (srv *Server) CurrentFunctionCall(ctx context.Context) (*core.FunctionCall, error)

If the current client is coming from a function, return the function call metadata

func (*Server) CurrentModule added in v0.11.8

func (srv *Server) CurrentModule(ctx context.Context) (*core.Module, error)

If the current client is coming from a function, return the module that function is from

func (*Server) CurrentServedDeps added in v0.11.8

func (srv *Server) CurrentServedDeps(ctx context.Context) (*core.ModDeps, error)

Return the list of deps being served to the current client

func (*Server) DiskUsage added in v0.11.8

func (*Server) Info added in v0.11.8

func (*Server) ListWorkers added in v0.11.8

func (*Server) ListenBuildHistory added in v0.11.8

func (*Server) LogMetrics added in v0.11.8

func (srv *Server) LogMetrics(l *logrus.Entry) *logrus.Entry

func (*Server) MuxEndpoint added in v0.11.8

func (srv *Server) MuxEndpoint(ctx context.Context, path string, handler http.Handler) error

Mix in this http endpoint+handler to the current client's session

func (*Server) Prune added in v0.11.8

func (*Server) Register added in v0.11.8

func (srv *Server) Register(server *grpc.Server)

func (*Server) ServeHTTP added in v0.11.8

func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves clients directly hitting the engine API (i.e. main client callers, not nested execs like module functions)

func (*Server) ServeHTTPToNestedClient added in v0.11.8

func (srv *Server) ServeHTTPToNestedClient(w http.ResponseWriter, r *http.Request, execMD *buildkit.ExecutionMetadata)

ServeHTTPToNestedClient serves nested clients, including module function calls. The only difference is that additional execution metadata is passed alongside the request from the executor. We don't want to put all this execution metadata in http headers since it includes arbitrary values from users in the function call metadata, which can exceed max header size.

func (*Server) ServeModule added in v0.11.8

func (srv *Server) ServeModule(ctx context.Context, mod *core.Module) error

Stitch in the given module to the list being served to the current client

func (*Server) Session added in v0.11.8

func (*Server) Solve added in v0.11.8

func (*Server) Status added in v0.11.8

func (*Server) UpdateBuildHistory added in v0.11.8

Jump to

Keyboard shortcuts

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