This section is empty.


This section is empty.


This section is empty.


type CancelableAuthReqestConstructor

type CancelableAuthReqestConstructor func() (authn.CancelableAuthRequest, error)

AuthReqConstructor knows how to construct an authn.CancelableAuthRequest instance

type CancelableAuthReqestHolder

type CancelableAuthReqestHolder struct {
	// contains filtered or unexported fields

CancelableAuthReqestHolder keeps an authenticator.Request instance. It allows for Get/Set operations in a thread-safe way

func NewAuthReqHolder

func NewAuthReqHolder() *CancelableAuthReqestHolder

NewAuthReqHolder returns new CancelableAuthReqestHolder instance

func (*CancelableAuthReqestHolder) Get

Get returns the instances stored in the CancelableAuthReqestHolder

func (*CancelableAuthReqestHolder) Set

Set stores given instances in the CancelableAuthReqestHolder

type CancelableAuthReqestReloader

type CancelableAuthReqestReloader struct {
	// contains filtered or unexported fields

CancelableAuthReqestReloader enables to create and re-create an instance of authn.CancelableAuthRequest in a thread-safe way. It implements authenticator.Request interface so it can be easily plugged in instead of a "real" instance.

func NewCancelableAuthReqestReloader

func NewCancelableAuthReqestReloader(constructor CancelableAuthReqestConstructor) (*CancelableAuthReqestReloader, error)

NewCancelableAuthReqestReloader creates a new instance of CancelableAuthReqestReloader. It requires a constructor to re-create the internal instance once Reload() is invoked.

func (*CancelableAuthReqestReloader) AuthenticateRequest

func (rar *CancelableAuthReqestReloader) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)

AuthenticateRequest implements authenticator.Request interface

func (*CancelableAuthReqestReloader) Reload

func (rar *CancelableAuthReqestReloader) Reload()

Reload reloads internal instance. It's safe to call it from other goroutines.

type StringValueConstructor

type StringValueConstructor func() (string, error)

StringValueConstructor knows how to construct a string

type StringValueHolder

type StringValueHolder struct {
	// contains filtered or unexported fields

StringValueHolder keeps a string and allows for Get/Set operations in a thread-safe way

func NewStringHolder

func NewStringHolder() *StringValueHolder

NewStringHolder returns new StringValueHolder instance

func (*StringValueHolder) Get

func (tlsh *StringValueHolder) Get() string

Get returns the string stored in the StringValueHolder

func (*StringValueHolder) Set

func (tlsh *StringValueHolder) Set(v string)

Set stores given string in the StringValueHolder

type StringValueReloader

type StringValueReloader struct {
	// contains filtered or unexported fields

StringValueReloader enables to create and re-create a string in a thread-safe way.

func NewStringValueReloader

func NewStringValueReloader(constructor StringValueConstructor) (*StringValueReloader, error)

NewStringValueReloader returns a new instance of StringValueReloader.

func (*StringValueReloader) GetString

func (rsp *StringValueReloader) GetString() string

GetString returns the string value stored in StringValueReloader

func (*StringValueReloader) Reload

func (rsp *StringValueReloader) Reload()

Reload reloads the internal instance. It's safe to call it from other goroutines

type Watcher

type Watcher interface {
	// Run start the watcher loop (blocking call)
	// context is used to terminate the loop

Watcher is designed to provide notifications about changes to files mounted inside kubernetes Pod, like Secrets or ConfigMaps Because file watches breaks in kubernetes when mounts are updated, we watch for directories instead. This happens because files mounted in a Pod are actually symbolic links pointing to "real" files. On updating mounted files, kubernetes deletes the existing file, which sends a DELETE file event and breaks the watch

func NewWatcher

func NewWatcher(name string, filePaths []string, evBatchDelaySeconds uint8, notifyFunc func()) Watcher

NewWatcher creates a new watcher instance name is used in logging filePaths parameter is a list of file paths to watch notifyFunc is a function that is invoked after watcher detects changes to monitored files.