Documentation
¶
Index ¶
- func FormatPlatforms(p []ocispecs.Platform) []string
- type ClientInitOpts
- type NewServerOpts
- type Server
- func (srv *Server) Close() error
- func (srv *Server) CurrentFunctionCall(ctx context.Context) (*core.FunctionCall, error)
- func (srv *Server) CurrentModule(ctx context.Context) (*core.Module, error)
- func (srv *Server) CurrentServedDeps(ctx context.Context) (*core.ModDeps, error)
- func (srv *Server) DiskUsage(ctx context.Context, r *controlapi.DiskUsageRequest) (*controlapi.DiskUsageResponse, error)
- func (srv *Server) Info(context.Context, *controlapi.InfoRequest) (*controlapi.InfoResponse, error)
- func (srv *Server) ListWorkers(context.Context, *controlapi.ListWorkersRequest) (*controlapi.ListWorkersResponse, error)
- func (srv *Server) ListenBuildHistory(*controlapi.BuildHistoryRequest, controlapi.Control_ListenBuildHistoryServer) error
- func (srv *Server) LogMetrics(l *logrus.Entry) *logrus.Entry
- func (srv *Server) MuxEndpoint(ctx context.Context, path string, handler http.Handler) error
- func (srv *Server) Prune(req *controlapi.PruneRequest, stream controlapi.Control_PruneServer) error
- func (srv *Server) Register(server *grpc.Server)
- func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (srv *Server) ServeHTTPToNestedClient(w http.ResponseWriter, r *http.Request, execMD *buildkit.ExecutionMetadata)
- func (srv *Server) ServeModule(ctx context.Context, mod *core.Module) error
- func (srv *Server) Session(controlapi.Control_SessionServer) error
- func (srv *Server) Solve(context.Context, *controlapi.SolveRequest) (*controlapi.SolveResponse, error)
- func (srv *Server) Status(*controlapi.StatusRequest, controlapi.Control_StatusServer) error
- func (srv *Server) UpdateBuildHistory(context.Context, *controlapi.UpdateBuildHistoryRequest) (*controlapi.UpdateBuildHistoryResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPlatforms ¶ added in v0.11.8
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 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) CurrentFunctionCall ¶ added in v0.11.8
If the current client is coming from a function, return the function call metadata
func (*Server) CurrentModule ¶ added in v0.11.8
If the current client is coming from a function, return the module that function is from
func (*Server) CurrentServedDeps ¶ added in v0.11.8
Return the list of deps being served to the current client
func (*Server) DiskUsage ¶ added in v0.11.8
func (srv *Server) DiskUsage(ctx context.Context, r *controlapi.DiskUsageRequest) (*controlapi.DiskUsageResponse, error)
func (*Server) Info ¶ added in v0.11.8
func (srv *Server) Info(context.Context, *controlapi.InfoRequest) (*controlapi.InfoResponse, error)
func (*Server) ListWorkers ¶ added in v0.11.8
func (srv *Server) ListWorkers(context.Context, *controlapi.ListWorkersRequest) (*controlapi.ListWorkersResponse, error)
func (*Server) ListenBuildHistory ¶ added in v0.11.8
func (srv *Server) ListenBuildHistory(*controlapi.BuildHistoryRequest, controlapi.Control_ListenBuildHistoryServer) error
func (*Server) LogMetrics ¶ added in v0.11.8
func (*Server) MuxEndpoint ¶ added in v0.11.8
Mix in this http endpoint+handler to the current client's session
func (*Server) Prune ¶ added in v0.11.8
func (srv *Server) Prune(req *controlapi.PruneRequest, stream controlapi.Control_PruneServer) error
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
Stitch in the given module to the list being served to the current client
func (*Server) Session ¶ added in v0.11.8
func (srv *Server) Session(controlapi.Control_SessionServer) error
func (*Server) Solve ¶ added in v0.11.8
func (srv *Server) Solve(context.Context, *controlapi.SolveRequest) (*controlapi.SolveResponse, error)
func (*Server) Status ¶ added in v0.11.8
func (srv *Server) Status(*controlapi.StatusRequest, controlapi.Control_StatusServer) error
func (*Server) UpdateBuildHistory ¶ added in v0.11.8
func (srv *Server) UpdateBuildHistory(context.Context, *controlapi.UpdateBuildHistoryRequest) (*controlapi.UpdateBuildHistoryResponse, error)