github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/tiltfile/starkit/load_interceptor.go (about)

     1  package starkit
     2  
     3  import (
     4  	"go.starlark.net/starlark"
     5  )
     6  
     7  // LoadInterceptor allows an Plugin to intercept a load to set the contents based on the requested path.
     8  type LoadInterceptor interface {
     9  	// LocalPath returns the path that the Tiltfile code should be read from.
    10  	// Must be stable, because it's used as a cache key
    11  	// Ensure the content is present in the path returned
    12  	// Returns "" if this interceptor doesn't act on this path
    13  	LocalPath(t *starlark.Thread, path string) (string, error)
    14  }