framework

package module
v0.0.0-...-feb569f Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 2 Imported by: 1

README

Steward

This repository contains the original Deis-built Proof of Concept for a Kubernetes-native Service Broker. Given broad interest in the Service Catalog space, Deis has joined forces with Google, Red Hat, IBM and others, under the Service Catalog special interest group.

Ongoing development is now happening in the service-catalog repository.

The original concepts which informed Deis' upstream involvement live in README-OLD.md.

Getting Involved

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindRequest

type BindRequest struct {
	InstanceID string
	ServiceID  string
	PlanID     string
	BindingID  string
	Parameters map[string]interface{}
}

BindRequest represents a request to bind to a service instance.

type BindResponse

type BindResponse struct {
	Creds map[string]interface{}
}

BindResponse represents a response to a BindRequest. It contains a map of credentials and other connection details for a service instance.

type Binder

type Binder interface {
	// Bind obtains valid credentials (and other connection details) for a service instance.
	Bind(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
		req *BindRequest,
	) (*BindResponse, error)
}

Binder obtains valid credentials (and other connection details) for service instances.

type Cataloger

type Cataloger interface {
	// List lists all the available services.
	List(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
	) ([]*Service, error)
}

Cataloger lists all the available services.

type DeprovisionRequest

type DeprovisionRequest struct {
	InstanceID        string
	ServiceID         string
	PlanID            string
	AcceptsIncomplete bool
	Parameters        map[string]interface{}
}

DeprovisionRequest represents a request to deprovision a service instance.

type DeprovisionResponse

type DeprovisionResponse struct {
	Operation string
	IsAsync   bool
}

DeprovisionResponse represents a response to a DeprovisionRequest.

type Deprovisioner

type Deprovisioner interface {
	// Deprovision deprovisions a service instance.
	Deprovision(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
		req *DeprovisionRequest,
	) (*DeprovisionResponse, error)
}

Deprovisioner deprovisions service instances.

type ErrUnknownOperationState

type ErrUnknownOperationState string

ErrUnknownOperationState is an error indicating that a string is not a known operation state.

func (ErrUnknownOperationState) Error

func (e ErrUnknownOperationState) Error() string

Error is the error interface implementation.

type Lifecycler

Lifecycler is a composition of several more narrowly scoped interfaces. It's intended for use in passing to functions that require all functionality.

type OperationState

type OperationState string

OperationState represents the state returned in a "get operation status" call. This type implements fmt.Stringer.

const (
	// OperationStateSucceeded is the OperationState indicating that the operation has succeeded
	OperationStateSucceeded OperationState = "succeeded"
	// OperationStateFailed is the OperationState indicating that the operation has failed.
	OperationStateFailed OperationState = "failed"
	// OperationStateInProgress is the OperationState indicating that the operation is still in
	// progress.
	OperationStateInProgress OperationState = "in progress"
	// OperationStateGone is the OperationState indicating that the service broker has deleted the
	// service instance in question. In the case of async deprovisioning, this is an indicator of
	// success.
	OperationStateGone OperationState = "gone"
)

func (OperationState) String

func (l OperationState) String() string

String is the fmt.Stringer interface implementation.

type OperationStatusRequest

type OperationStatusRequest struct {
	InstanceID string
	ServiceID  string
	PlanID     string
	Operation  string
}

OperationStatusRequest represents a request to query the status of an asynchronous operation that is pending completion by the backing service broker.

type OperationStatusResponse

type OperationStatusResponse struct {
	State string
}

OperationStatusResponse represents a response to a OperationStatusRequest.

func (*OperationStatusResponse) GetState

func (o *OperationStatusResponse) GetState() (OperationState, error)

GetState returns the OperationState corresponding to a OperationStatusResponse instance's State attribute, or an error if that State attribute does not correspond to a valid OperationState.

type OperationStatusRetriever

type OperationStatusRetriever interface {
	// GetOperationStatus fetches the status of an asynchronous operation that is pending completion.
	GetOperationStatus(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
		req *OperationStatusRequest,
	) (*OperationStatusResponse, error)
}

OperationStatusRetriever fetches the status of an asynchronous operation that is pending completion.

type ProvisionRequest

type ProvisionRequest struct {
	InstanceID        string
	PlanID            string
	ServiceID         string
	AcceptsIncomplete bool
	Parameters        map[string]interface{}
}

ProvisionRequest represents a request to provision a service instance.

type ProvisionResponse

type ProvisionResponse struct {
	Operation string
	IsAsync   bool
	Extra     map[string]interface{}
}

ProvisionResponse represents a response to ProvisionRequest.

type Provisioner

type Provisioner interface {
	// Provision provisions a service instance.
	Provision(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
		req *ProvisionRequest,
	) (*ProvisionResponse, error)
}

Provisioner provisions services instances.

type Service

type Service struct {
	ServiceInfo
	Plans []ServicePlan
}

Service represents a requestable service.

type ServiceBrokerSpec

type ServiceBrokerSpec struct {
	URL      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type ServiceInfo

type ServiceInfo struct {
	Name          string
	ID            string
	Description   string
	PlanUpdatable bool
}

ServiceInfo represents all ascpects of a requestable service, except for its ServicePlans.

type ServicePlan

type ServicePlan struct {
	ID          string
	Name        string
	Description string
	Free        bool
}

ServicePlan represents a specific configuration or variant of its parent Service.

type UnbindRequest

type UnbindRequest struct {
	InstanceID string
	ServiceID  string
	PlanID     string
	BindingID  string
}

UnbindRequest represents a request invalidate a consumer's credentials for a service instance.

type Unbinder

type Unbinder interface {
	// Unbind invalidates the specified credentials.
	Unbind(
		ctx context.Context,
		serviceBrokerSpec ServiceBrokerSpec,
		req *UnbindRequest,
	) error
}

Unbinder invalidates credentials for service instances.

Directories

Path Synopsis
k8s
k8s
web
api

Jump to

Keyboard shortcuts

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