Documentation
¶
Index ¶
- Constants
- func DetectDefaultGCCap(dstat disk.DiskStat) config.GCSpace
- func FormatPlatforms(p []ocispecs.Platform) []string
- type ClientInitOpts
- type Fetcher
- type LogsPubSub
- type MetricsPubSub
- func (ps MetricsPubSub) Aggregation(sdkmetric.InstrumentKind) sdkmetric.Aggregation
- func (ps MetricsPubSub) Export(ctx context.Context, metrics *metricdata.ResourceMetrics) error
- func (ps MetricsPubSub) ForceFlush(ctx context.Context) error
- func (ps MetricsPubSub) Shutdown(context.Context) error
- func (ps MetricsPubSub) Temporality(sdkmetric.InstrumentKind) metricdata.Temporality
- type NewServerOpts
- type PubSub
- func (ps *PubSub) Logs(client *daggerClient) sdklog.Exporter
- func (ps *PubSub) LogsHandler(rw http.ResponseWriter, r *http.Request)
- func (ps *PubSub) LogsSubscribeHandler(w http.ResponseWriter, r *http.Request, client *daggerClient) error
- func (ps *PubSub) Metrics(client *daggerClient) sdkmetric.Exporter
- func (ps *PubSub) MetricsHandler(rw http.ResponseWriter, r *http.Request)
- func (ps *PubSub) MetricsSubscribeHandler(w http.ResponseWriter, r *http.Request, client *daggerClient) error
- func (ps *PubSub) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (ps *PubSub) Spans(client *daggerClient) sdktrace.SpanExporter
- func (ps *PubSub) TracesHandler(rw http.ResponseWriter, r *http.Request)
- func (ps *PubSub) TracesSubscribeHandler(w http.ResponseWriter, r *http.Request, client *daggerClient) error
- type Server
- func (srv *Server) AddClientResourcesFromID(ctx context.Context, id *resource.ID, sourceClientID string, skipTopLevel bool) error
- func (srv *Server) Auth(ctx context.Context) (*auth.RegistryAuthProvider, error)
- func (srv *Server) Buildkit(ctx context.Context) (*buildkit.Client, error)
- func (srv *Server) Cache(ctx context.Context) (*dagql.SessionCache, error)
- 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) DagqlServer(ctx context.Context) (*dagql.Server, error)
- func (srv *Server) DefaultDeps(ctx context.Context) (*core.ModDeps, error)
- func (srv *Server) EngineLocalCacheEntries(ctx context.Context) (*core.EngineCacheEntrySet, error)
- func (srv *Server) EngineLocalCachePolicy() *bkclient.PruneInfo
- func (srv *Server) Info(context.Context, *controlapi.InfoRequest) (*controlapi.InfoResponse, error)
- func (srv *Server) LeaseManager() *leaseutil.Manager
- func (srv *Server) ListWorkers(context.Context, *controlapi.ListWorkersRequest) (*controlapi.ListWorkersResponse, error)
- func (srv *Server) LogMetrics(l *logrus.Entry) *logrus.Entry
- func (srv *Server) MainClientCallerMetadata(ctx context.Context) (*engine.ClientMetadata, error)
- func (srv *Server) MuxEndpoint(ctx context.Context, path string, handler http.Handler) error
- func (srv *Server) NonModuleParentClientMetadata(ctx context.Context) (*engine.ClientMetadata, error)
- func (srv *Server) OCIStore() content.Store
- func (srv *Server) Platform() core.Platform
- func (srv *Server) PruneEngineLocalCacheEntries(ctx context.Context) (*core.EngineCacheEntrySet, error)
- func (srv *Server) Register(server *grpc.Server)
- func (srv *Server) Secrets(ctx context.Context) (*core.SecretStore, error)
- 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) Server(ctx context.Context) (*dagql.Server, error)
- func (srv *Server) Services(ctx context.Context) (*core.Services, error)
- func (srv *Server) Sockets(ctx context.Context) (*core.SocketStore, error)
- type SpansPubSub
- type Topic
Constants ¶
const InstrumentationLibrary = "dagger.io/engine.server"
Variables ¶
This section is empty.
Functions ¶
func DetectDefaultGCCap ¶ added in v0.13.7
func FormatPlatforms ¶ added in v0.11.8
Types ¶
type ClientInitOpts ¶ added in v0.11.8
type ClientInitOpts struct { *engine.ClientMetadata // If this is a nested client, the call that created the client (i.e. a function call or // an exec with nesting enabled) CallID *call.ID // If this is a nested client, the client ID of the caller that created it CallerClientID string // 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 // Client resource IDs passed to this client from parent object fields. // Needed to handle finding any secrets, sockets or other client resources // that this client should have access to due to being set in the parent // object. ParentIDs map[digest.Digest]*resource.ID // corner case: when initializing a module by calling it to get its typedefs, we don't actually // have a full EncodedModuleID yet, but some SDKs still call CurrentModule.name then. For this // case we just provide the ModuleName and use that to support CurrentModule.name. ModuleName string }
type LogsPubSub ¶ added in v0.12.5
type LogsPubSub struct { *PubSub // contains filtered or unexported fields }
func (LogsPubSub) ForceFlush ¶ added in v0.12.5
func (ps LogsPubSub) ForceFlush(ctx context.Context) error
type MetricsPubSub ¶ added in v0.13.6
type MetricsPubSub struct { *PubSub // contains filtered or unexported fields }
func (MetricsPubSub) Aggregation ¶ added in v0.13.6
func (ps MetricsPubSub) Aggregation(sdkmetric.InstrumentKind) sdkmetric.Aggregation
func (MetricsPubSub) Export ¶ added in v0.13.6
func (ps MetricsPubSub) Export(ctx context.Context, metrics *metricdata.ResourceMetrics) error
func (MetricsPubSub) ForceFlush ¶ added in v0.13.6
func (ps MetricsPubSub) ForceFlush(ctx context.Context) error
func (MetricsPubSub) Shutdown ¶ added in v0.13.6
func (ps MetricsPubSub) Shutdown(context.Context) error
func (MetricsPubSub) Temporality ¶ added in v0.13.6
func (ps MetricsPubSub) Temporality(sdkmetric.InstrumentKind) metricdata.Temporality
type NewServerOpts ¶ added in v0.11.8
type PubSub ¶ added in v0.12.5
type PubSub struct {
// contains filtered or unexported fields
}
func (*PubSub) LogsHandler ¶ added in v0.12.5
func (ps *PubSub) LogsHandler(rw http.ResponseWriter, r *http.Request)
func (*PubSub) LogsSubscribeHandler ¶ added in v0.12.5
func (*PubSub) MetricsHandler ¶ added in v0.12.5
func (ps *PubSub) MetricsHandler(rw http.ResponseWriter, r *http.Request)
func (*PubSub) MetricsSubscribeHandler ¶ added in v0.13.6
func (*PubSub) ServeHTTP ¶ added in v0.12.5
func (ps *PubSub) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*PubSub) Spans ¶ added in v0.12.5
func (ps *PubSub) Spans(client *daggerClient) sdktrace.SpanExporter
func (*PubSub) TracesHandler ¶ added in v0.12.5
func (ps *PubSub) TracesHandler(rw http.ResponseWriter, r *http.Request)
func (*PubSub) TracesSubscribeHandler ¶ added in v0.12.5
type Server ¶ added in v0.11.8
type Server struct { controlapi.UnimplementedControlServer 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) AddClientResourcesFromID ¶ added in v0.12.1
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) DagqlServer ¶ added in v0.16.3
func (*Server) DefaultDeps ¶ added in v0.12.0
The default deps of every user module (currently just core)
func (*Server) EngineLocalCacheEntries ¶ added in v0.12.0
Return all the cache entries in the local cache. No support for filtering yet.
func (*Server) EngineLocalCachePolicy ¶ added in v0.13.7
func (*Server) Info ¶ added in v0.11.8
func (srv *Server) Info(context.Context, *controlapi.InfoRequest) (*controlapi.InfoResponse, error)
func (*Server) LeaseManager ¶ added in v0.12.0
The lease manager for the engine as a whole
func (*Server) ListWorkers ¶ added in v0.11.8
func (srv *Server) ListWorkers(context.Context, *controlapi.ListWorkersRequest) (*controlapi.ListWorkersResponse, error)
func (*Server) LogMetrics ¶ added in v0.11.8
func (*Server) MainClientCallerMetadata ¶ added in v0.17.0
The Client metadata of the main client caller (i.e. the one who created the session, typically the CLI invoked by the user)
func (*Server) MuxEndpoint ¶ added in v0.11.8
Mix in this http endpoint+handler to the current client's session
func (*Server) NonModuleParentClientMetadata ¶ added in v0.12.6
func (srv *Server) NonModuleParentClientMetadata(ctx context.Context) (*engine.ClientMetadata, error)
The nearest ancestor client that is not a module (either a caller from the host like the CLI or a nested exec). Useful for figuring out where local sources should be resolved from through chains of dependency modules.
func (*Server) PruneEngineLocalCacheEntries ¶ added in v0.12.0
func (srv *Server) PruneEngineLocalCacheEntries(ctx context.Context) (*core.EngineCacheEntrySet, error)
Prune everything that is releasable in the local cache. No support for filtering yet.
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
type SpansPubSub ¶ added in v0.12.5
type SpansPubSub struct { *PubSub // contains filtered or unexported fields }
func (SpansPubSub) ExportSpans ¶ added in v0.12.5
func (ps SpansPubSub) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
func (SpansPubSub) ForceFlush ¶ added in v0.12.5
func (ps SpansPubSub) ForceFlush(ctx context.Context) error