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

Method Register

pkg/hooks/handler.go:103–105  ·  view source on GitHub ↗

Register associates a factory with a hook type, replacing any prior one.

(t HookType, f HandlerFactory)

Source from the content-addressed store, hash-verified

101
102// Register associates a factory with a hook type, replacing any prior one.
103func (r *Registry) Register(t HookType, f HandlerFactory) {
104 r.factories.Store(t, f)
105}
106
107// Lookup returns the factory registered for t, or (nil, false).
108func (r *Registry) Lookup(t HookType) (HandlerFactory, bool) {

Calls 1

StoreMethod · 0.45