storage

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

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 2 Imported by: 3

README

   Gloo Storage Client

Gloo Storage Client


Gloo is a function gateway built on top of the Envoy Proxy. Gloo provides a unified entry point for access to all services and serverless functions, translating from any interface spoken by a client to any interface spoken by a backend. Gloo aggregates REST APIs and events calls from clients, "glueing" together services in-cluster, out of cluster, across clusters, along with any provider of serverless functions.

This Repo

This repository contains the sources for the Gloo Storage Client. The Gloo Storage Client is the centerpiece for the Gloo API. Both clients to Gloo (including the Gloo discovery services) and Gloo itself consume this library to interact with the storage layer, the universal source of truth in Gloo's world.

Developers of integrations should use this repository as a client library for their application (if it's written in Go). Support for more languages is in our roadmap.

For information about storage in Gloo and writing client integrations, see our documentation.

Documentation

Get started by reading our docs here: https://gloo.solo.io/

Community

Join us on our slack channel: https://slack.solo.io/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlreadyExists

func IsAlreadyExists(err error) bool

func NewAlreadyExistsErr

func NewAlreadyExistsErr(err error) *alreadyExistsErr

Types

type Interface

type Interface interface {
	V1() V1
}

Interface is interface to the storage backend

type UpstreamEventHandler

type UpstreamEventHandler interface {
	OnAdd(updatedList []*v1.Upstream, obj *v1.Upstream)
	OnUpdate(updatedList []*v1.Upstream, newObj *v1.Upstream)
	OnDelete(updatedList []*v1.Upstream, obj *v1.Upstream)
}

type UpstreamEventHandlerFuncs

type UpstreamEventHandlerFuncs struct {
	AddFunc    func(updatedList []*v1.Upstream, obj *v1.Upstream)
	UpdateFunc func(updatedList []*v1.Upstream, newObj *v1.Upstream)
	DeleteFunc func(updatedList []*v1.Upstream, obj *v1.Upstream)
}

UpstreamEventHandlerFuncs is an adaptor to let you easily specify as many or as few of the notification functions as you want while still implementing UpstreamEventHandler.

func (UpstreamEventHandlerFuncs) OnAdd

func (r UpstreamEventHandlerFuncs) OnAdd(updatedList []*v1.Upstream, obj *v1.Upstream)

OnAdd calls AddFunc if it's not nil.

func (UpstreamEventHandlerFuncs) OnDelete

func (r UpstreamEventHandlerFuncs) OnDelete(updatedList []*v1.Upstream, obj *v1.Upstream)

OnDelete calls DeleteFunc if it's not nil.

func (UpstreamEventHandlerFuncs) OnUpdate

func (r UpstreamEventHandlerFuncs) OnUpdate(updatedList []*v1.Upstream, newObj *v1.Upstream)

OnUpdate calls UpdateFunc if it's not nil.

type Upstreams

type Upstreams interface {
	Create(*v1.Upstream) (*v1.Upstream, error)
	Update(*v1.Upstream) (*v1.Upstream, error)
	Delete(name string) error
	Get(name string) (*v1.Upstream, error)
	List() ([]*v1.Upstream, error)
	Watch(handlers ...UpstreamEventHandler) (*Watcher, error)
}

type V1

type V1 interface {
	Register() error
	Upstreams() Upstreams
	VirtualHosts() VirtualHosts
}

type VirtualHostEventHandler

type VirtualHostEventHandler interface {
	OnAdd(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)
	OnUpdate(updatedList []*v1.VirtualHost, newObj *v1.VirtualHost)
	OnDelete(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)
}

type VirtualHostEventHandlerFuncs

type VirtualHostEventHandlerFuncs struct {
	AddFunc    func(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)
	UpdateFunc func(updatedList []*v1.VirtualHost, newObj *v1.VirtualHost)
	DeleteFunc func(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)
}

VirtualHostEventHandlerFuncs is an adaptor to let you easily specify as many or as few of the notification functions as you want while still implementing VirtualHostEventHandler.

func (VirtualHostEventHandlerFuncs) OnAdd

func (r VirtualHostEventHandlerFuncs) OnAdd(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)

OnAdd calls AddFunc if it's not nil.

func (VirtualHostEventHandlerFuncs) OnDelete

func (r VirtualHostEventHandlerFuncs) OnDelete(updatedList []*v1.VirtualHost, obj *v1.VirtualHost)

OnDelete calls DeleteFunc if it's not nil.

func (VirtualHostEventHandlerFuncs) OnUpdate

func (r VirtualHostEventHandlerFuncs) OnUpdate(updatedList []*v1.VirtualHost, newObj *v1.VirtualHost)

OnUpdate calls UpdateFunc if it's not nil.

type VirtualHosts

type VirtualHosts interface {
	Create(*v1.VirtualHost) (*v1.VirtualHost, error)
	Update(*v1.VirtualHost) (*v1.VirtualHost, error)
	Delete(name string) error
	Get(name string) (*v1.VirtualHost, error)
	List() ([]*v1.VirtualHost, error)
	Watch(...VirtualHostEventHandler) (*Watcher, error)
}

type Watcher

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

func NewWatcher

func NewWatcher(runFunc func(stop <-chan struct{}, errs chan error)) *Watcher

func (*Watcher) Run

func (w *Watcher) Run(stop <-chan struct{}, errs chan error)

Directories

Path Synopsis
crd
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/solo.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/solo.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
solo.io/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
internal

Jump to

Keyboard shortcuts

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