MCPcopy Index your code
hub / github.com/docker/docker-agent / NewRegistry

Function NewRegistry

pkg/hooks/handler.go:95–100  ·  view source on GitHub ↗

NewRegistry returns a registry pre-populated with [HookTypeCommand] (shell command hooks) and [HookTypeBuiltin] (in-process functions).

()

Source from the content-addressed store, hash-verified

93// NewRegistry returns a registry pre-populated with [HookTypeCommand]
94// (shell command hooks) and [HookTypeBuiltin] (in-process functions).
95func NewRegistry() *Registry {
96 r := &Registry{}
97 r.Register(HookTypeCommand, newCommandFactory())
98 r.Register(HookTypeBuiltin, r.builtinFactory)
99 return r
100}
101
102// Register associates a factory with a hook type, replacing any prior one.
103func (r *Registry) Register(t HookType, f HandlerFactory) {

Calls 2

RegisterMethod · 0.95
newCommandFactoryFunction · 0.85