Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct { // OnStart is called when the build process starts. OnStart OnStartFunc // OnError is called when the build process encounters an error. OnError OnErrorFunc // OnComplete is called when the build process completes successfully. OnComplete OnCompleteFunc }
Hooks is a struct that contains hook functions.
type OnCompleteFunc ¶
type OnCompleteFunc func(name string, desc ocispec.Descriptor)
OnCompleteFunc defines the signature for the OnComplete hook function.
type OnErrorFunc ¶
OnErrorFunc defines the signature for the OnError hook function.
type OnStartFunc ¶
OnStartFunc defines the signature for the OnStart hook function.
type Option ¶
type Option func(*Hooks)
Option is a function type that can be used to customize a Hooks instance.
func WithOnComplete ¶
func WithOnComplete(f OnCompleteFunc) Option
WithOnComplete returns an Option that sets the OnComplete hook.
func WithOnError ¶
func WithOnError(f OnErrorFunc) Option
WithOnError returns an Option that sets the OnError hook.
func WithOnStart ¶
func WithOnStart(f OnStartFunc) Option
WithOnStart returns an Option that sets the OnStart hook.
Click to show internal directories.
Click to hide internal directories.