Documentation
¶
Overview ¶
Package plugin provides a modular plugin architecture for Kaniko Inspired by BuildKit's pluggable architecture
Index ¶
- Variables
- type CacheFactory
- type ExecutorFactory
- type Registry
- func (r *Registry) CreateCache(name string, opts *config.KanikoOptions) (cache.LayerCache, error)
- func (r *Registry) CreateExecutor(name string, opts *config.KanikoOptions) (interface{}, error)
- func (r *Registry) CreateSnapshotter(name string, opts *config.KanikoOptions) (interface{}, error)
- func (r *Registry) GetStats() map[string]interface{}
- func (r *Registry) ListCaches() []string
- func (r *Registry) ListExecutors() []string
- func (r *Registry) ListSnapshots() []string
- func (r *Registry) RegisterCache(name string, factory CacheFactory)
- func (r *Registry) RegisterExecutor(name string, factory ExecutorFactory)
- func (r *Registry) RegisterSnapshotter(name string, factory SnapshotterFactory)
- func (r *Registry) String() string
- type SnapshotterFactory
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownCache = errors.New("unknown cache")
ErrUnknownCache is returned when cache is not found
var ErrUnknownExecutor = errors.New("unknown executor")
ErrUnknownExecutor is returned when executor is not found
var ErrUnknownSnapshotter = errors.New("unknown snapshotter")
ErrUnknownSnapshotter is returned when snapshotter is not found
Functions ¶
This section is empty.
Types ¶
type CacheFactory ¶
type CacheFactory func(opts *config.KanikoOptions) (cache.LayerCache, error)
CacheFactory creates a cache instance
type ExecutorFactory ¶
type ExecutorFactory func(opts *config.KanikoOptions) (interface{}, error)
ExecutorFactory creates an executor instance Returns interface{} to allow different executor types
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages plugin registration and creation
func GetGlobalRegistry ¶
func GetGlobalRegistry() *Registry
GetGlobalRegistry returns the global plugin registry
func (*Registry) CreateCache ¶
func (r *Registry) CreateCache(name string, opts *config.KanikoOptions) (cache.LayerCache, error)
CreateCache creates a cache instance by name
func (*Registry) CreateExecutor ¶
func (r *Registry) CreateExecutor(name string, opts *config.KanikoOptions) (interface{}, error)
CreateExecutor creates an executor instance by name
func (*Registry) CreateSnapshotter ¶
func (r *Registry) CreateSnapshotter(name string, opts *config.KanikoOptions) (interface{}, error)
CreateSnapshotter creates a snapshotter instance by name
func (*Registry) ListCaches ¶
ListCaches returns a list of registered cache names
func (*Registry) ListExecutors ¶
ListExecutors returns a list of registered executor names
func (*Registry) ListSnapshots ¶
ListSnapshots returns a list of registered snapshotter names
func (*Registry) RegisterCache ¶
func (r *Registry) RegisterCache(name string, factory CacheFactory)
RegisterCache registers a cache factory
func (*Registry) RegisterExecutor ¶
func (r *Registry) RegisterExecutor(name string, factory ExecutorFactory)
RegisterExecutor registers an executor factory
func (*Registry) RegisterSnapshotter ¶
func (r *Registry) RegisterSnapshotter(name string, factory SnapshotterFactory)
RegisterSnapshotter registers a snapshotter factory
type SnapshotterFactory ¶
type SnapshotterFactory func(opts *config.KanikoOptions) (interface{}, error)
SnapshotterFactory creates a snapshotter instance Returns interface{} to allow different snapshotter types