access

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedChecker

type AggregatedChecker struct {
	// contains filtered or unexported fields
}

AggregatedChecker is a checker which aggregates multiple checks. All checks are performed sequentially. First failed check stops further ones.

func New

func New(reFinder remoteEnvironmentFinder, reInterface versioned.RemoteenvironmentV1alpha1Interface, iFind instanceFinder) *AggregatedChecker

New creates new aggregated checker

func (*AggregatedChecker) CanProvision

CanProvision performs actual check

type CanProvisionOutput

type CanProvisionOutput struct {
	Allowed bool
	Reason  string
}

CanProvisionOutput aggregates following information: if provision can be performed and reason

type MappingExistsProvisionChecker

type MappingExistsProvisionChecker struct {
	// contains filtered or unexported fields
}

MappingExistsProvisionChecker is a checker which can wait some time for EnvironmentMapping before it forbids provisioning

func NewMappingExistsProvisionChecker

func NewMappingExistsProvisionChecker(reFinder remoteEnvironmentFinder, reInterface versioned.RemoteenvironmentV1alpha1Interface) *MappingExistsProvisionChecker

NewMappingExistsProvisionChecker creates new access checker

func (*MappingExistsProvisionChecker) CanProvision

func (c *MappingExistsProvisionChecker) CanProvision(serviceID internal.RemoteServiceID, namespace internal.Namespace, maxWaitTime time.Duration) (CanProvisionOutput, error)

CanProvision checks if service instance can be provisioned in the namespace

type ProvisionChecker

type ProvisionChecker interface {
	CanProvision(iID internal.InstanceID, rsID internal.RemoteServiceID, namespace internal.Namespace, maxWaitTime time.Duration) (CanProvisionOutput, error)
}

ProvisionChecker define methods for checking if provision can succeed

type UniquenessProvisionChecker

type UniquenessProvisionChecker struct {
	InstanceFinder instanceFinder
}

UniquenessProvisionChecker is a checker which ensures that only one instance of a specific class is in namespace.

func NewUniquenessProvisionChecker

func NewUniquenessProvisionChecker(iFind instanceFinder) *UniquenessProvisionChecker

NewUniquenessProvisionChecker creates new access checker

func (*UniquenessProvisionChecker) CanProvision

CanProvision performs actual check

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL