Documentation ¶
Index ¶
- Variables
- func Add(so Storage, ctx context.Context, key, value string) (err error)
- func Delete(so Storage, ctx context.Context, key string) (err error)
- func Get(so Storage, ctx context.Context, key string) (value string, err error)
- func GetAll(so Storage, ctx context.Context) (result map[string]data.Object, err error)
- func ProcessChanges(so Storage, ctx context.Context, dataMap **map[string]data.Object, ...) (err error)
- func ProcessChangesWithFunction(so Storage, ctx context.Context, function ProcessFunc) (err error)
- type KubeConfigMapStore
- func (s *KubeConfigMapStore) AddEntry(ctx context.Context, entryKey, value string) (err error)
- func (s *KubeConfigMapStore) DeleteEntry(ctx context.Context, entryKey string) (err error)
- func (s *KubeConfigMapStore) GetName() (name string)
- func (s *KubeConfigMapStore) ProcessChanges(ctx context.Context, dataMap **map[string]data.Object, lock *sync.Mutex) (err error)
- func (s *KubeConfigMapStore) ProcessChangesWithFunction(ctx context.Context, function ProcessFunc) (err error)
- func (s *KubeConfigMapStore) ReadAllEntries(ctx context.Context) (result map[string]data.Object, err error)
- func (s *KubeConfigMapStore) ReadEntry(ctx context.Context, entryKey string) (value string, err error)
- type KubeConfigMapStoreBuilder
- func (b *KubeConfigMapStoreBuilder) Build() (storage *KubeConfigMapStore, err error)
- func (b *KubeConfigMapStoreBuilder) SetClient(client *k8s.Client) *KubeConfigMapStoreBuilder
- func (b *KubeConfigMapStoreBuilder) SetFieldOwner(fieldOwner string) *KubeConfigMapStoreBuilder
- func (b *KubeConfigMapStoreBuilder) SetJsonAPI(api jsoniter.API) *KubeConfigMapStoreBuilder
- func (b *KubeConfigMapStoreBuilder) SetName(name string) *KubeConfigMapStoreBuilder
- func (b *KubeConfigMapStoreBuilder) SetNamespace(namespace string) *KubeConfigMapStoreBuilder
- type ProcessFunc
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func ProcessChanges ¶
func ProcessChangesWithFunction ¶
func ProcessChangesWithFunction(so Storage, ctx context.Context, function ProcessFunc) (err error)
Types ¶
type KubeConfigMapStore ¶
type KubeConfigMapStore struct {
// contains filtered or unexported fields
}
func (*KubeConfigMapStore) AddEntry ¶
func (s *KubeConfigMapStore) AddEntry(ctx context.Context, entryKey, value string) (err error)
k8s configmap methods
func (*KubeConfigMapStore) DeleteEntry ¶
func (s *KubeConfigMapStore) DeleteEntry(ctx context.Context, entryKey string) (err error)
func (*KubeConfigMapStore) GetName ¶
func (s *KubeConfigMapStore) GetName() (name string)
func (*KubeConfigMapStore) ProcessChanges ¶
func (*KubeConfigMapStore) ProcessChangesWithFunction ¶
func (s *KubeConfigMapStore) ProcessChangesWithFunction(ctx context.Context, function ProcessFunc) (err error)
func (*KubeConfigMapStore) ReadAllEntries ¶
func (s *KubeConfigMapStore) ReadAllEntries(ctx context.Context) (result map[string]data.Object, err error)
The handler read to DB and build/recovery datastructures in memory
type KubeConfigMapStoreBuilder ¶
type KubeConfigMapStoreBuilder struct {
// contains filtered or unexported fields
}
func NewKubeConfigMapStoreBuilder ¶
func NewKubeConfigMapStoreBuilder() *KubeConfigMapStoreBuilder
func (*KubeConfigMapStoreBuilder) Build ¶
func (b *KubeConfigMapStoreBuilder) Build() (storage *KubeConfigMapStore, err error)
func (*KubeConfigMapStoreBuilder) SetClient ¶
func (b *KubeConfigMapStoreBuilder) SetClient( client *k8s.Client) *KubeConfigMapStoreBuilder
func (*KubeConfigMapStoreBuilder) SetFieldOwner ¶
func (b *KubeConfigMapStoreBuilder) SetFieldOwner( fieldOwner string) *KubeConfigMapStoreBuilder
func (*KubeConfigMapStoreBuilder) SetJsonAPI ¶
func (b *KubeConfigMapStoreBuilder) SetJsonAPI( api jsoniter.API) *KubeConfigMapStoreBuilder
func (*KubeConfigMapStoreBuilder) SetName ¶
func (b *KubeConfigMapStoreBuilder) SetName( name string) *KubeConfigMapStoreBuilder
func (*KubeConfigMapStoreBuilder) SetNamespace ¶
func (b *KubeConfigMapStoreBuilder) SetNamespace( namespace string) *KubeConfigMapStoreBuilder
type ProcessFunc ¶
ProcessFunc process change function
type Storage ¶
type Storage interface { // notification from db to application about db entry changes // currently assume the notification is granular to indivial entry ReadEntry(ctx context.Context, key string) (value string, err error) AddEntry(ctx context.Context, key string, value string) (err error) DeleteEntry(ctx context.Context, key string) (err error) ReadAllEntries(ctx context.Context) (result map[string]data.Object, err error) ProcessChanges(ctx context.Context, dataMap **map[string]data.Object, lock *sync.Mutex) (err error) ProcessChangesWithFunction(ctx context.Context, function ProcessFunc) (err error) }
Storage interface for persistent storage
Click to show internal directories.
Click to hide internal directories.