Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClientReader ¶
WithClientReader is used to pass in a client parameter, and you can choose to pass in an existing client or use WithRestConfig to pass in the rest config to generate one.
func WithRestConfig ¶
WithRestConfig is used to pass in the rest config parameter, which is used to generate a client. The default value is InClusterConfig.
func WithScheme ¶
WithScheme sets the custom scheme for the client. The default value is Kubernetes scheme.
Types ¶
type Client ¶
type Client interface { // Get retrieves an object for the given object key. Get(ctx context.Context, key types.NamespacedName, opts ...client.GetOption) (client.Object, error) // List retrieves list of objects for a given namespace and list options. List(ctx context.Context, namespace string, opts ...client.ListOption) (client.ObjectList, error) }
Client is a typed client that allows for querying objects directly through their GVK (group, version, and kind) without having to pre-initialize objects of the corresponding type.
func NewTypedClient ¶
func NewTypedClient(gvk schema.GroupVersionKind, opts ...func(*options)) (Client, error)
NewTypedClient returns a new Client implementation.
func NewUnstructuredTypedClient ¶
func NewUnstructuredTypedClient(gvk schema.GroupVersionKind, opts ...func(*options)) (Client, error)
NewUnstructuredTypedClient returns a new Client implementation that returns all objects as Unstructured objects.