Documentation ¶
Overview ¶
Package client provides the Runtime SDK client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtensionNameFromHandlerName ¶ added in v1.5.2
ExtensionNameFromHandlerName extracts the extension name from the canonical name of a registered runtime extension handler.
func NameForHandler ¶ added in v1.5.2
func NameForHandler(handler runtimehooksv1.ExtensionHandler, extensionConfig *runtimev1.ExtensionConfig) (string, error)
NameForHandler constructs a canonical name for a registered runtime extension handler.
Types ¶
type Client ¶
type Client interface { // WarmUp can be used to initialize a "cold" RuntimeClient with all // known runtimev1.ExtensionConfigs at a given time. // After WarmUp completes the RuntimeClient is considered ready. WarmUp(extensionConfigList *runtimev1.ExtensionConfigList) error // IsReady return true after the RuntimeClient finishes warmup. IsReady() bool // Discover makes the discovery call on the extension and returns an updated ExtensionConfig // with extension handlers information in the ExtensionConfig status. Discover(context.Context, *runtimev1.ExtensionConfig) (*runtimev1.ExtensionConfig, error) // Register registers the ExtensionConfig. Register(extensionConfig *runtimev1.ExtensionConfig) error // Unregister unregisters the ExtensionConfig. Unregister(extensionConfig *runtimev1.ExtensionConfig) error // CallAllExtensions calls all the ExtensionHandler registered for the hook. CallAllExtensions(ctx context.Context, hook runtimecatalog.Hook, forObject metav1.Object, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject) error // CallExtension calls the ExtensionHandler with the given name. CallExtension(ctx context.Context, hook runtimecatalog.Hook, forObject metav1.Object, name string, request runtimehooksv1.RequestObject, response runtimehooksv1.ResponseObject) error }
Client is the runtime client to interact with extensions.
type Options ¶
type Options struct { Catalog *runtimecatalog.Catalog Registry runtimeregistry.ExtensionRegistry Client ctrlclient.Client }
Options are creation options for a Client.
Click to show internal directories.
Click to hide internal directories.