hub

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 13 Imported by: 14

Documentation

Index

Constants

View Source
const KnownUID = "__known__"
View Source
const PoolSize = 1024 // This number should match the max number of concurrent clusters handled

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV interface {
	Set(key string, val *v1alpha1.ResourceDescriptor)
	Get(key string) (*v1alpha1.ResourceDescriptor, bool)
	Visit(func(key string, val *v1alpha1.ResourceDescriptor))
}
var (
	KnownResources KV = &KVMap{
		cache: make(map[string]*v1alpha1.ResourceDescriptor),
	}
	KnownClasses = make(map[string]*v1alpha1.ResourceClass)
)

func NewKVLocal

func NewKVLocal() KV

type KVLocal

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

KVLocal is not concurrent safe.

func (*KVLocal) Get

func (s *KVLocal) Get(key string) (*v1alpha1.ResourceDescriptor, bool)

func (*KVLocal) Set

func (s *KVLocal) Set(key string, val *v1alpha1.ResourceDescriptor)

func (*KVLocal) Visit

func (s *KVLocal) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type KVMap

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

KVMap is concurrent safe.

func (*KVMap) Get

func (s *KVMap) Get(key string) (*v1alpha1.ResourceDescriptor, bool)

func (*KVMap) Set

func (s *KVMap) Set(key string, val *v1alpha1.ResourceDescriptor)

func (*KVMap) Visit

func (s *KVMap) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type Pool

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

func MustPool

func MustPool(kvFactory func() KV) *Pool

func NewPool

func NewPool(kvFactory func() KV) (*Pool, error)

func (*Pool) GetRegistry

func (p *Pool) GetRegistry(uid string) *Registry

type Registry

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

func NewRegistry

func NewRegistry(uid string, cache KV) *Registry

func NewRegistryOfKnownResources

func NewRegistryOfKnownResources() *Registry

func (*Registry) AvailableResourcePanel

func (r *Registry) AvailableResourcePanel() (*v1alpha1.ResourcePanel, error)

func (*Registry) DefaultResourcePanel

func (r *Registry) DefaultResourcePanel() (*v1alpha1.ResourcePanel, error)

func (*Registry) GVK

func (*Registry) GVR

func (*Registry) IsNamespaced

func (r *Registry) IsNamespaced(gvr schema.GroupVersionResource) (bool, error)

func (*Registry) LoadByFile

func (r *Registry) LoadByFile(filename string) (*v1alpha1.ResourceDescriptor, error)

func (*Registry) LoadByGVR

func (*Registry) LoadByName

func (r *Registry) LoadByName(name string) (*v1alpha1.ResourceDescriptor, error)

func (*Registry) Register

func (r *Registry) Register(gvr schema.GroupVersionResource, cfg *rest.Config) error

func (*Registry) Resources

func (r *Registry) Resources() []schema.GroupVersionResource

func (*Registry) TypeMeta

func (*Registry) Types

func (r *Registry) Types() []metav1.TypeMeta

func (*Registry) Visit

func (r *Registry) Visit(f func(key string, val *v1alpha1.ResourceDescriptor))

type UnregisteredErr

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

func (UnregisteredErr) Error

func (e UnregisteredErr) Error() string

Directories

Path Synopsis
Package resourceclasses Code generated by go-bindata.
Package resourceclasses Code generated by go-bindata.
Package resourcedescriptors Code generated by go-bindata.
Package resourcedescriptors Code generated by go-bindata.

Jump to

Keyboard shortcuts

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