secret

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSecretInterface

func CreateSecretInterface(namespace string) (watcher.WatchObject, error)

CreateSecretInterface - Creates a v1.SecretInterface in order to build a k8s object monitor for Secrets

Types

type Database

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

Database - Stores data of multiple Secret objects. Synchronizes with Secret objects through watcher.WatchEventHandler interface.

func NewDatabase

func NewDatabase(ctx context.Context, channel chan<- struct{}) *Database

func (*Database) End

func (db *Database) End(ctx context.Context, namespace, name string)

End - Removes secret with namespace and name from database, and signals change. Note: monitoring of particular secret was ordered to stop, because it is no longer of interest. Thus there's no point keeping related information.

func (*Database) Handle

func (db *Database) Handle(ctx context.Context, event *watch.Event)

Handle - Handles update of database based on the event Object.

func (*Database) Load

func (db *Database) Load(namespace, name, key string) ([]byte, error)

Load - Searches the database for key in secret referenced by name.

type DatabaseInterface

type DatabaseInterface interface {
	watcher.WatchEventHandler
	Load(namespace, name, key string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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