ops

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceInstanceExternalIDIndex = "serviceInstanceExternalID"
)

Variables

This section is empty.

Functions

func ServiceInstanceExternalIDIndexFunc

func ServiceInstanceExternalIDIndexFunc(obj interface{}) ([]string, error)

ServiceInstanceExternalIDIndexFunc indexes based on a ServiceInstance's externalID

Types

type API

type API struct {
	Providers    map[string]ProviderInterface
	ProviderLock sync.RWMutex
	ASAPConfig   pkiutil.ASAP
	// contains filtered or unexported fields
}

func NewOpsAPI

func NewOpsAPI(logger *zap.Logger, asapConfig pkiutil.ASAP, router *chi.Mux,
	registry prometheus.Registerer,
	instanceInf cache.SharedIndexInformer) (*API, error)

func (*API) AddOrUpdateProvider

func (o *API) AddOrUpdateProvider(p ProviderInterface)

func (*API) GetProvider

func (o *API) GetProvider(name string) (ProviderInterface, error)

func (*API) Instrumentation

func (o *API) Instrumentation(next http.Handler) http.Handler

func (*API) RemoveProvider

func (o *API) RemoveProvider(providerName string)

type Action

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

type Controller

type Controller struct {
	Logger       *zap.Logger
	ReadyForWork func()

	RouteInformer cache.SharedIndexInformer
	API           RouteAPI
}

func (*Controller) Process

func (c *Controller) Process(ctx *ctrl.ProcessContext) (externalErr bool, retriable bool, err error)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Run begins watching and syncing.

type Info

type Info struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Version     string `json:"version"`
}

type OpenAPISpec

type OpenAPISpec struct {
	OpenAPI string                 `json:"openapi"`
	Info    Info                   `json:"info,omitempty"`
	Servers []Server               `json:"servers,omitempty"`
	Paths   map[string]interface{} `json:"paths"`
}

Temporary until we find a stable OpenApi3 spec library

type PathDefinition

type PathDefinition struct {
	Tags        []string `json:"tags"`
	OperationID string   `json:"operationId"`
}

type Provider

type Provider struct {
	ProviderName string `json:"name"`
	// contains filtered or unexported fields
}

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) OwnsPlan

func (p *Provider) OwnsPlan(planID string) bool

func (*Provider) ProxyRequest

func (p *Provider) ProxyRequest(asapConfig pkiutil.ASAP, w http.ResponseWriter, r *http.Request, uri string)

func (Provider) Render

func (Provider) Render(w http.ResponseWriter, r *http.Request) error

func (*Provider) ReportAction

func (p *Provider) ReportAction() string

func (*Provider) Request

func (p *Provider) Request(asapConfig pkiutil.ASAP, r *http.Request, uri string, user string) (*http.Response, error)

type ProviderInterface

type ProviderInterface interface {
	ProxyRequest(asapConfig pkiutil.ASAP, w http.ResponseWriter, r *http.Request, uri string)
	Request(asapConfig pkiutil.ASAP, r *http.Request, uri string, user string) (*http.Response, error)
	ReportAction() string
	Render(w http.ResponseWriter, r *http.Request) error

	Name() string
	OwnsPlan(string) bool
}

type ProviderResponse

type ProviderResponse struct {
	ProviderNames []string
}

func (*ProviderResponse) Render

type RouteAPI

type RouteAPI interface {
	AddOrUpdateProvider(ProviderInterface)
}

type Server

type Server struct {
	URL         string `json:"url"`
	Description string `json:"description,omitempty"`
}

Directories

Path Synopsis
This package has the automatically generated clientset.
This package has the automatically generated clientset.
fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
typed/ops/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
typed/ops/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
util

Jump to

Keyboard shortcuts

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