MCPcopy Create free account
hub / github.com/dagger/dagger / InstallInterface

Method InstallInterface

dagql/server.go:572–585  ·  view source on GitHub ↗

InstallInterface installs the given Interface type into the schema. If an interface with the same name is already installed, it is returned.

(iface *Interface, directives ...*ast.Directive)

Source from the content-addressed store, hash-verified

570// InstallInterface installs the given Interface type into the schema.
571// If an interface with the same name is already installed, it is returned.
572func (s *Server) InstallInterface(iface *Interface, directives ...*ast.Directive) *Interface {
573 s.installLock.Lock()
574 if len(directives) > 0 {
575 iface.addDirectives(directives...)
576 }
577 installed := s.installInterfaceLocked(iface)
578 s.installLock.Unlock()
579
580 for _, hook := range s.installHooks {
581 hook.InstallInterface(installed, directives...)
582 }
583
584 return installed
585}
586
587// installInterfaceLocked is the lock-held implementation of InstallInterface.
588func (s *Server) installInterfaceLocked(iface *Interface) *Interface {

Callers

nothing calls this directly

Calls 3

addDirectivesMethod · 0.80
InstallInterfaceMethod · 0.65

Tested by

no test coverage detected