Documentation ¶
Index ¶
- Constants
- type Conf
- type Overlay
- type Store
- func (s *Store) Close() (outErr error)
- func (s *Store) Driver() string
- func (s *Store) GetFirstMatch(ctx context.Context, candidates []namer.ModuleID) (*runtimev1.RunnablePolicySet, error)
- func (s *Store) GetOverlayPolicyLoader(ctx context.Context, schemaMgr schema.Manager) (engine.PolicyLoader, error)
- func (s *Store) InspectPolicies(ctx context.Context, params storage.ListPolicyIDsParams) (map[string]*responsev1.InspectPoliciesResponse_Result, error)
- func (s *Store) ListPolicyIDs(ctx context.Context, params storage.ListPolicyIDsParams) ([]string, error)
- func (s *Store) ListSchemaIDs(ctx context.Context) ([]string, error)
- func (s *Store) LoadSchema(ctx context.Context, url string) (io.ReadCloser, error)
- func (s *Store) Reload(ctx context.Context) error
Constants ¶
View Source
const DriverName = "overlay"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { // BaseDriver is the default storage driver BaseDriver string `yaml:"baseDriver" conf:"required,example=blob"` // FallbackDriver is the secondary or fallback storage driver FallbackDriver string `yaml:"fallbackDriver" conf:"required,example=disk"` // FallbackErrorThreshold is the max number of errors we allow within the fallbackErrorWindow period FallbackErrorThreshold int `yaml:"fallbackErrorThreshold,omitempty" conf:",example=5"` // FallbackErrorWindow is the cyclic period within which we aggregate failures FallbackErrorWindow time.Duration `yaml:"fallbackErrorWindow" conf:",example=5m"` }
Conf is required (if driver is set to 'overlay') configuration for overlay storage driver. +desc=This section is required only if storage.driver is overlay.
func (*Conf) SetDefaults ¶
func (conf *Conf) SetDefaults()
type Overlay ¶
type Overlay interface { // GetOverlayPolicyLoader returns a PolicyLoader implementation that wraps two SourceStores GetOverlayPolicyLoader(ctx context.Context, schemaMgr schema.Manager) (engine.PolicyLoader, error) }
The interface is defined here because placing in storage causes a circular dependency, probably because it blurs the lines by implementing `SourceStore` whilst having a dependency on `schema` in order to build the compile managers in the GetOverlayPolicyLoader method.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetFirstMatch ¶ added in v0.29.0
func (*Store) GetOverlayPolicyLoader ¶
func (s *Store) GetOverlayPolicyLoader(ctx context.Context, schemaMgr schema.Manager) (engine.PolicyLoader, error)
GetOverlayPolicyLoader instantiates both the base and fallback policy loaders and then returns itself.
func (*Store) InspectPolicies ¶ added in v0.35.0
func (s *Store) InspectPolicies(ctx context.Context, params storage.ListPolicyIDsParams) (map[string]*responsev1.InspectPoliciesResponse_Result, error)
func (*Store) ListPolicyIDs ¶
func (*Store) LoadSchema ¶
Click to show internal directories.
Click to hide internal directories.