Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceUnmarshaller ¶
ResourceUnmarshaller defines the interface for unmarshalling fetched data. This interface works with any data format (JSON, XML, etc.).
type SyncedResource ¶
type SyncedResource struct {
// contains filtered or unexported fields
}
SyncedResource provides automatic fetching and caching of remote data with TTL-based refresh. It works with any data format via the ResourceUnmarshaller interface. It's used for JWKS (JSON), SAML metadata (XML), OIDC configuration (JSON), and other synced data. The sync goroutine exits when the provided context is cancelled.
func NewSyncedResource ¶
func NewSyncedResource( ctx context.Context, file, fileContext, uri string, transport http.RoundTripper, roundTripName string, ttl time.Duration, maxStale time.Duration, unmarshaller ResourceUnmarshaller, log *logrus.Entry) (*SyncedResource, error)
func (*SyncedResource) Data ¶
func (s *SyncedResource) Data() (interface{}, error)
Click to show internal directories.
Click to hide internal directories.