Documentation
¶
Index ¶
- func APIClient[T any](ctx context.Context, base *BaseClient, builder Builder[T]) (*T, error)
- func CertificateRequestMutator(ctx context.Context, req *http.Request) error
- func ControllerClient[T any](ctx context.Context, base *BaseClient, builder Builder[T], ...) (*T, error)
- func DynamicClientFromContext(ctx context.Context) client.Client
- func NewContextWithDynamicClient(ctx context.Context, client client.Client) context.Context
- func NewContextWithStaticClient(ctx context.Context, client client.Client) context.Context
- func StaticClientFromContext(ctx context.Context) client.Client
- func TraceContextRequestMutator(ctx context.Context, req *http.Request) error
- type AccessTokenGetter
- type Allocations
- type BaseClient
- type Builder
- type Client
- type Options
- type References
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIClient ¶ added in v1.4.0
APIClient returns a new OpenAPI client that can be used to access the API from another API.
func CertificateRequestMutator ¶ added in v1.4.0
CertificateRequestMutator sets the client certifcate header when bound to an access token.
func ControllerClient ¶ added in v1.4.0
func ControllerClient[T any](ctx context.Context, base *BaseClient, builder Builder[T], resource metav1.Object) (*T, error)
ControllerClient returns a new OpenAPI client that can be used to access the API from another controller. It requires a resource that stores the identity principal information.
Types ¶
type AccessTokenGetter ¶ added in v0.2.44
AccessTokenGetter provides an interface to retrieve an access token.
type Allocations ¶ added in v1.10.0
type Allocations struct {
// contains filtered or unexported fields
}
Allocations wraps up quota allocation management. This is specific to API handlers only.
func NewAllocations ¶ added in v1.10.0
func NewAllocations(client client.Client, api openapi.ClientWithResponsesInterface) *Allocations
func (*Allocations) Create ¶ added in v1.10.0
func (r *Allocations) Create(ctx context.Context, resource client.Object, allocations openapi.ResourceAllocationList) error
Create accepts a resource kind, creates an allocation for it with the requested set of resources, and patches the allocation ID into the resource for tracking. TODO: could we not just use the resource reference as eky, rather than messing with IDs?
func (*Allocations) Update ¶ added in v1.10.0
func (r *Allocations) Update(ctx context.Context, resource client.Object, allocations openapi.ResourceAllocationList) error
Update updates an existing allocation, typically for scaling operations.
type BaseClient ¶ added in v1.4.0
type BaseClient struct {
// contains filtered or unexported fields
}
BaseClient wraps up the raw OpenAPI client with TLS and TLS client options, so that they can be used by any service provider's API or controllers.
func NewBaseClient ¶ added in v1.4.0
func NewBaseClient(client client.Client, options *Options, clientOptions *coreclient.HTTPClientOptions) *BaseClient
NewBaseClient creates a new client.
func (*BaseClient) HTTPClient ¶ added in v1.4.0
HTTPClient returns a new http client that will handle TLS and mTLS only.
type Client ¶ added in v0.2.7
type Client struct {
// contains filtered or unexported fields
}
Client wraps up the raw OpenAPI client with things to make it useable e.g. authorization and TLS.
func New ¶
func New(client client.Client, options *Options, clientOptions *coreclient.HTTPClientOptions) *Client
New creates a new client.
func (*Client) APIClient ¶ added in v1.4.0
APIClient returns a new OpenAPI client that can be used to access the Identity API from another service provider's API.
func (*Client) ControllerClient ¶ added in v1.9.0
func (c *Client) ControllerClient(ctx context.Context, resource metav1.Object) (*openapi.ClientWithResponses, error)
ControllerClient returns a new OpenAPI client that can be used to access the API from another controller. It requires a resource that stores the identity principal information.
type Options ¶ added in v0.2.8
type Options = coreclient.HTTPOptions
func NewOptions ¶ added in v0.2.30
func NewOptions() *Options
NewOptions must be used to create options for consistency.
type References ¶ added in v1.9.0
type References struct {
// contains filtered or unexported fields
}
References allows references to be added and removed on identity resources from remote services.
func NewReferences ¶ added in v1.9.0
func NewReferences(serviceDescriptor util.ServiceDescriptor, serverOptions *coreclient.HTTPOptions, clientOptions *coreclient.HTTPClientOptions) *References