Documentation
¶
Overview ¶
following the same pattern in of jwk lib https://github.com/lestrrat-go/jwx/blob/main/jwk/refresh.go
Index ¶
- type AutoRefreshX
- func (af *AutoRefreshX) Configure(ctx context.Context, tlsConfig config.TLSConfigInterface, ...)
- func (af *AutoRefreshX) Object(ctx context.Context) (core.RefreshableInterface, error)
- func (af *AutoRefreshX) Refresh(ctx context.Context) (core.RefreshableInterface, error)
- func (af *AutoRefreshX) Stats() interface{}
- func (af *AutoRefreshX) Stop()
- type AutoRefreshXConfigInterface
- type AutoRefreshXInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoRefreshX ¶
type AutoRefreshX struct {
// contains filtered or unexported fields
}
AutoRefreshX is the object taking care of refreshing tls secrets from secretsmanager can handle both Writer and Reader structs, due to the core.RefreshableInterface it runs a ticker which when triggered will run the machinery to fetch a new set of secrets and refresh the refreshable object handles the fetching of this object via mutex
func (*AutoRefreshX) Configure ¶
func (af *AutoRefreshX) Configure(ctx context.Context, tlsConfig config.TLSConfigInterface, saslConfig config.SASLConfigInterface)
Configure allows to pass a new tls config to the autorefresh
func (*AutoRefreshX) Object ¶
func (af *AutoRefreshX) Object(ctx context.Context) (core.RefreshableInterface, error)
Object will return the refreshable object (will need to be casted to Writer or Reader)
func (*AutoRefreshX) Refresh ¶
func (af *AutoRefreshX) Refresh(ctx context.Context) (core.RefreshableInterface, error)
Refresh force a manual refresh of the secrets
func (*AutoRefreshX) Stats ¶
func (af *AutoRefreshX) Stats() interface{}
Stats returns reader or writer stats (will need to be casted)
func (*AutoRefreshX) Stop ¶
func (af *AutoRefreshX) Stop()
Stop sends a message on the shutdown channel which will bring the infinite loop to a halt
type AutoRefreshXConfigInterface ¶ added in v1.2.0
type AutoRefreshXConfigInterface interface { config.ConfigInterface GetMutexObj() *sync.RWMutex }
AutoRefreshXConfigInterface is the refresh.AutoRefreshX config interface, embeds ConfigInterface
type AutoRefreshXInterface ¶
type AutoRefreshXInterface interface { Configure(context.Context, config.TLSConfigInterface, config.SASLConfigInterface) Object(context.Context) (core.RefreshableInterface, error) Stats() interface{} Refresh(context.Context) (core.RefreshableInterface, error) Stop() }
AutoRefreshXInterface is the interface for the autorefresh functionality
func NewAutoRefreshX ¶
func NewAutoRefreshX(ctx context.Context, cfg AutoRefreshXConfigInterface, refreshable core.RefreshableInterface, logger logging.LoggerInterface, monitor monitoring.MonitorInterface) AutoRefreshXInterface
NewAutoRefreshX creates an object implementing AutoRefreshXInterface