Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1014 Bytes

File metadata and controls

38 lines (30 loc) · 1014 Bytes

Module Hooks Example with Dependency Container

In input values of your hook, you have prebuilded clients, which you can use, if you need some additional info.

Warning

Dependency container clients should only be used as a last resort, because requests through them load the system more than working with our hook manager in Deckhouse.

Run

To get list of your registered hooks

go run . hook list

To get configs of your registered hooks

go run . hook config

To dump configs of your registered hooks in file

go run . hook dump

To run registered hook with index '0' (you can see index of your hook in output of "hook list" command)

go run . hook run 0

By default, all logs in hooks are suppressed and he waiting for files in default folders. To make them available, you must add env variable LOG_LEVEL and CREATE_FILES.

CREATE_FILES=true LOG_LEVEL=INFO go run . hook run 0

Build

go build -o dependency-example-module-hooks .