client

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlatformClient

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

PlatformClient implements all broker, visibility and catalog specific operations for kubernetes

func NewClient

func NewClient(settings *config.Settings) (*PlatformClient, error)

NewClient create a client to communicate with the kubernetes service-catalog.

func (*PlatformClient) Broker

func (pc *PlatformClient) Broker() platform.BrokerClient

Broker returns the platform client which handles broker operations

func (*PlatformClient) CatalogFetcher

func (pc *PlatformClient) CatalogFetcher() platform.CatalogFetcher

CatalogFetcher returns the platform client which handles catalog fetch operations

func (*PlatformClient) CreateBroker

CreateBroker registers a new broker in kubernetes service-catalog.

func (*PlatformClient) DeleteBroker

DeleteBroker deletes an existing broker in from kubernetes service-catalog.

func (*PlatformClient) DisableAccessForPlan

func (pc *PlatformClient) DisableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error

DisableAccessForPlan disables the access for the specified plan

func (*PlatformClient) EnableAccessForPlan

func (pc *PlatformClient) EnableAccessForPlan(ctx context.Context, request *platform.ModifyPlanAccessRequest) error

EnableAccessForPlan enables the access for the specified plan

func (*PlatformClient) Fetch

func (pc *PlatformClient) Fetch(ctx context.Context, serviceBroker *platform.ServiceBroker) error

Fetch the new catalog information from reach service-broker registered in kubernetes, so that it is visible in the kubernetes service-catalog.

func (*PlatformClient) GetBrokerByName

func (pc *PlatformClient) GetBrokerByName(ctx context.Context, name string) (*platform.ServiceBroker, error)

GetBrokerByName returns the service-broker with the specified name currently registered in kubernetes service-catalog with.

func (*PlatformClient) GetBrokers

func (pc *PlatformClient) GetBrokers(ctx context.Context) ([]*platform.ServiceBroker, error)

GetBrokers returns all service-brokers currently registered in kubernetes service-catalog.

func (*PlatformClient) GetVisibilitiesByBrokers

func (pc *PlatformClient) GetVisibilitiesByBrokers(ctx context.Context, brokers []string) ([]*platform.Visibility, error)

GetVisibilitiesByBrokers get currently available visibilities in the platform for specific broker names

func (*PlatformClient) UpdateBroker

UpdateBroker updates a service broker in the kubernetes service-catalog.

func (*PlatformClient) Visibility

func (pc *PlatformClient) Visibility() platform.VisibilityClient

Visibility returns the platform client which handles visibility operations

func (*PlatformClient) VisibilityScopeLabelKey

func (pc *PlatformClient) VisibilityScopeLabelKey() string

VisibilityScopeLabelKey returns a specific label key which should be used when converting SM visibilities to platform.Visibilities

type ServiceCatalogAPI

type ServiceCatalogAPI struct {
	*servicecatalog.SDK
}

ServiceCatalogAPI uses service catalog SDK to interact with the kubernetes resources

func NewDefaultKubernetesAPI

func NewDefaultKubernetesAPI(cli *servicecatalog.SDK) *ServiceCatalogAPI

NewDefaultKubernetesAPI returns default kubernetes api interface

func (*ServiceCatalogAPI) CreateClusterServiceBroker

func (sca *ServiceCatalogAPI) CreateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)

CreateClusterServiceBroker creates a cluster service broker

func (*ServiceCatalogAPI) DeleteClusterServiceBroker

func (sca *ServiceCatalogAPI) DeleteClusterServiceBroker(name string, options *v1.DeleteOptions) error

DeleteClusterServiceBroker deletes a cluster service broker

func (*ServiceCatalogAPI) RetrieveClusterServiceBrokerByName

func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokerByName(name string) (*v1beta1.ClusterServiceBroker, error)

RetrieveClusterServiceBrokerByName returns a cluster service broker by name

func (*ServiceCatalogAPI) RetrieveClusterServiceBrokers

func (sca *ServiceCatalogAPI) RetrieveClusterServiceBrokers() (*v1beta1.ClusterServiceBrokerList, error)

RetrieveClusterServiceBrokers returns all cluster service brokers

func (*ServiceCatalogAPI) SyncClusterServiceBroker

func (sca *ServiceCatalogAPI) SyncClusterServiceBroker(name string, retries int) error

SyncClusterServiceBroker synchronizes a cluster service broker including its catalog

func (*ServiceCatalogAPI) UpdateClusterServiceBroker

func (sca *ServiceCatalogAPI) UpdateClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) (*v1beta1.ClusterServiceBroker, error)

UpdateClusterServiceBroker updates a cluster service broker

Jump to

Keyboard shortcuts

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