import "go.chromium.org/luci/gae/service/module"
AddFilters adds RawInterface filters to the context.
DefaultVersion returns the name of the default version for the specified module.
If module is the empty string, it means the default.
List lists the names of modules belonging to this application.
NumInstances returns the number of instances servicing the specified module/version.
If module or version is the empty string, it means the default.
Set sets the current RawInterface object in the context. Useful for testing with a quick mock. This is just a shorthand SetFactory invocation to set a factory which always returns the same object.
SetFactory sets the function to produce RawInterface instances, as returned by the Get method.
SetNumInstances sets the number of instances of a given module/version.
If module or version is the empty string, it means the default.
Start starts the specified module/version.
If module or version is the empty string, it means the default.
Stop stops the specified module/version.
If module or version is the empty string, it means the default.
Versions returns the names of versions for the specified module.
If module is the empty string, it means the default.
type Factory func(context.Context) RawInterface
Factory is the function signature for factory methods compatible with SetFactory.
type Filter func(context.Context, RawInterface) RawInterface
Filter is the function signature for a filter module implementation. It gets the current module implementation, and returns a new module implementation backed by the one passed in.
type RawInterface interface { List() ([]string, error) NumInstances(module, version string) (int, error) SetNumInstances(module, version string, instances int) error Versions(module string) ([]string, error) DefaultVersion(module string) (string, error) Start(module, version string) error Stop(module, version string) error }
RawInterface is the interface for all of the package methods which normally would be in the 'module' package.
func Raw(c context.Context) RawInterface
Raw gets the RawInterface implementation from context.
Package module imports 1 packages (graph) and is imported by 8 packages. Updated 2021-01-26. Refresh now. Tools for package owners.