Documentation ¶
Overview ¶
Package podaccessbuilder implements the IBuilder interface for PodAccessRequest resources
Index ¶
- Variables
- type PodAccessBuilder
- func (b *PodAccessBuilder) AccessResourcesAreReady(ctx context.Context, client client.Client, req v1alpha1.IRequestResource, ...) (bool, error)
- func (b *PodAccessBuilder) CreateAccessResources(ctx context.Context, client client.Client, req v1alpha1.IRequestResource, ...) (statusString string, err error)
- func (b *PodAccessBuilder) GetAccessDuration(req v1alpha1.IRequestResource, tmpl v1alpha1.ITemplateResource) (time.Duration, string, error)
- func (b *PodAccessBuilder) GetTemplate(ctx context.Context, client client.Client, req v1alpha1.IRequestResource) (v1alpha1.ITemplateResource, error)
- func (b *PodAccessBuilder) SetRequestOwnerReference(ctx context.Context, client client.Client, req v1alpha1.IRequestResource, ...) error
Constants ¶
This section is empty.
Variables ¶
var PodPhaseRunning = corev1.PodRunning
PodPhaseRunning is exposed here so that we can reconfigure the search during tests to look for Pending pods.
Functions ¶
This section is empty.
Types ¶
type PodAccessBuilder ¶
type PodAccessBuilder struct{}
PodAccessBuilder implements the IBuilder interface for PodAccessRequest resources
func (*PodAccessBuilder) AccessResourcesAreReady ¶
func (b *PodAccessBuilder) AccessResourcesAreReady( ctx context.Context, client client.Client, req v1alpha1.IRequestResource, _ v1alpha1.ITemplateResource, ) (bool, error)
AccessResourcesAreReady implements the IBuilder interface by checking for the current state of the Pod for the user and returning True when it is ready, or False if it is not ready after a specified timeout.
TODO: Implement a per-pod-access-template setting to tune this timeout.
func (*PodAccessBuilder) CreateAccessResources ¶
func (b *PodAccessBuilder) CreateAccessResources( ctx context.Context, client client.Client, req v1alpha1.IRequestResource, tmpl v1alpha1.ITemplateResource, ) (statusString string, err error)
CreateAccessResources implements the IBuilder interface
func (*PodAccessBuilder) GetAccessDuration ¶
func (b *PodAccessBuilder) GetAccessDuration( req v1alpha1.IRequestResource, tmpl v1alpha1.ITemplateResource, ) (time.Duration, string, error)
GetAccessDuration implements the IBuilder interface
func (*PodAccessBuilder) GetTemplate ¶
func (b *PodAccessBuilder) GetTemplate( ctx context.Context, client client.Client, req v1alpha1.IRequestResource, ) (v1alpha1.ITemplateResource, error)
GetTemplate implements the IBuilder interface
func (*PodAccessBuilder) SetRequestOwnerReference ¶
func (b *PodAccessBuilder) SetRequestOwnerReference( ctx context.Context, client client.Client, req v1alpha1.IRequestResource, tmpl v1alpha1.ITemplateResource, ) error
SetRequestOwnerReference implements the IBuilder interface
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package internal separates out some of the internal builder logic from the top level podaccessbuilder package to make it easier to see the interface-implementing methods as separate from the backend business logic.
|
Package internal separates out some of the internal builder logic from the top level podaccessbuilder package to make it easier to see the interface-implementing methods as separate from the backend business logic. |