factory

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 27 Imported by: 44

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
	QueryOptions *api.QueryOptions
}

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
	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
}

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(ctx context.Context, params NewResourceClientParams) (clients.ResourceClient, error)
}

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

type VaultSecretClientFactory

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

func (*VaultSecretClientFactory) NewResourceClient

Jump to

Keyboard shortcuts

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