factory

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 26 Imported by: 67

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulResourceClientFactory

type ConsulResourceClientFactory struct {
	Consul  *api.Client
	RootKey string
}

func (*ConsulResourceClientFactory) NewResourceClient

type FileResourceClientFactory

type FileResourceClientFactory struct {
	RootDir string
}

func (*FileResourceClientFactory) NewResourceClient

type KubeConfigMapClientFactory

type KubeConfigMapClientFactory struct {
	Clientset kubernetes.Interface
	Cache     cache.KubeCoreCache
	// set this  to true if resource fields are all strings
	// resources will be stored as plain kubernetes configmaps without serializing/deserializing as objects
	PlainConfigmaps bool
	// a custom handler to define how configmaps are serialized/deserialized out of resources
	// if set, Plain is ignored
	CustomConverter configmap.ConfigMapConverter
	// the cluster that these resources belong to
	// all resources written and read by the resource client
	// will be marked with this cluster
	Cluster string
}

func (*KubeConfigMapClientFactory) NewResourceClient

type KubeResourceClientFactory

type KubeResourceClientFactory struct {
	Crd                crd.Crd
	Cfg                *rest.Config
	SharedCache        kube.SharedCache
	SkipCrdCreation    bool
	NamespaceWhitelist []string
	ResyncPeriod       time.Duration
	// the cluster that these resources belong to
	// all resources written and read by the resource client
	// will be marked with this cluster
	Cluster string
}

If SkipCrdCreation is set to 'true', the clients built with this factory will not attempt to create the given CRD during registration. This allows us to create and register resource clients in cases where the given configuration contains a token associated with a user that is not authorized to create CRDs. Clients built with this factory will be able to access only resources the given namespace list. If no value is provided, clients will be able to access resources in all namespaces.

func (*KubeResourceClientFactory) NewResourceClient

type KubeSecretClientFactory

type KubeSecretClientFactory struct {
	Clientset kubernetes.Interface
	// set this  to true if resource fields are all strings
	// resources will be stored as plain kubernetes secrets without serializing/deserializing as objects
	PlainSecrets    bool
	SecretConverter kubesecret.SecretConverter
	Cache           cache.KubeCoreCache
	// the cluster that these resources belong to
	// all resources written and read by the resource client
	// will be marked with this cluster
	Cluster string
}

func (*KubeSecretClientFactory) NewResourceClient

type MemoryResourceClientFactory

type MemoryResourceClientFactory struct {
	Cache memory.InMemoryResourceCache
}

func (*MemoryResourceClientFactory) NewResourceClient

type NewResourceClientParams

type NewResourceClientParams struct {
	ResourceType resources.Resource
	Token        string
}

type ResourceClientFactory

type ResourceClientFactory interface {
	NewResourceClient(params NewResourceClientParams) (clients.ResourceClient, error)
}

https://golang.org/doc/faq#generics

type VaultSecretClientFactory

type VaultSecretClientFactory struct {
	Vault   *vaultapi.Client
	RootKey string
}

func (*VaultSecretClientFactory) NewResourceClient

Jump to

Keyboard shortcuts

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