storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

README

Storage Client

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

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 AttributeEventHandler

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

type AttributeEventHandlerFuncs

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

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

func (AttributeEventHandlerFuncs) OnAdd

func (r AttributeEventHandlerFuncs) OnAdd(updatedList []*v1.Attribute, obj *v1.Attribute)

OnAdd calls AddFunc if it's not nil.

func (AttributeEventHandlerFuncs) OnDelete

func (r AttributeEventHandlerFuncs) OnDelete(updatedList []*v1.Attribute, obj *v1.Attribute)

OnDelete calls DeleteFunc if it's not nil.

func (AttributeEventHandlerFuncs) OnUpdate

func (r AttributeEventHandlerFuncs) OnUpdate(updatedList []*v1.Attribute, newObj *v1.Attribute)

OnUpdate calls UpdateFunc if it's not nil.

type Attributes

type Attributes interface {
	Create(*v1.Attribute) (*v1.Attribute, error)
	Update(*v1.Attribute) (*v1.Attribute, error)
	Delete(name string) error
	Get(name string) (*v1.Attribute, error)
	List() ([]*v1.Attribute, error)
	Watch(...AttributeEventHandler) (*Watcher, error)
}

type Interface

type Interface interface {
	V1() V1
}

Interface is interface to the storage backend

type RoleEventHandler

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

type RoleEventHandlerFuncs

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

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

func (RoleEventHandlerFuncs) OnAdd

func (r RoleEventHandlerFuncs) OnAdd(updatedList []*v1.Role, obj *v1.Role)

OnAdd calls AddFunc if it's not nil.

func (RoleEventHandlerFuncs) OnDelete

func (r RoleEventHandlerFuncs) OnDelete(updatedList []*v1.Role, obj *v1.Role)

OnDelete calls DeleteFunc if it's not nil.

func (RoleEventHandlerFuncs) OnUpdate

func (r RoleEventHandlerFuncs) OnUpdate(updatedList []*v1.Role, newObj *v1.Role)

OnUpdate calls UpdateFunc if it's not nil.

type Roles

type Roles interface {
	Create(*v1.Role) (*v1.Role, error)
	Update(*v1.Role) (*v1.Role, error)
	Delete(name string) error
	Get(name string) (*v1.Role, error)
	List() ([]*v1.Role, error)
	Watch(...RoleEventHandler) (*Watcher, error)
}

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
	VirtualServices() VirtualServices
	Roles() Roles
	Attributes() Attributes
}

type VirtualServiceEventHandler

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

type VirtualServiceEventHandlerFuncs

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

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

func (VirtualServiceEventHandlerFuncs) OnAdd

func (r VirtualServiceEventHandlerFuncs) OnAdd(updatedList []*v1.VirtualService, obj *v1.VirtualService)

OnAdd calls AddFunc if it's not nil.

func (VirtualServiceEventHandlerFuncs) OnDelete

func (r VirtualServiceEventHandlerFuncs) OnDelete(updatedList []*v1.VirtualService, obj *v1.VirtualService)

OnDelete calls DeleteFunc if it's not nil.

func (VirtualServiceEventHandlerFuncs) OnUpdate

func (r VirtualServiceEventHandlerFuncs) OnUpdate(updatedList []*v1.VirtualService, newObj *v1.VirtualService)

OnUpdate calls UpdateFunc if it's not nil.

type VirtualServices

type VirtualServices interface {
	Create(*v1.VirtualService) (*v1.VirtualService, error)
	Update(*v1.VirtualService) (*v1.VirtualService, error)
	Delete(name string) error
	Get(name string) (*v1.VirtualService, error)
	List() ([]*v1.VirtualService, error)
	Watch(...VirtualServiceEventHandler) (*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.

Jump to

Keyboard shortcuts

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