package wasm
import "github.com/open-policy-agent/opa/v1/resolver/wasm"
Index ¶
- type Resolver
- func New(entrypoints []ast.Ref, policy []byte, data interface{}) (*Resolver, error)
- func (r *Resolver) Close()
- func (r *Resolver) Entrypoints() []ast.Ref
- func (r *Resolver) Eval(ctx context.Context, input resolver.Input) (resolver.Result, error)
- func (r *Resolver) RemoveDataPath(ctx context.Context, path []string) error
- func (r *Resolver) SetData(ctx context.Context, data interface{}) error
- func (r *Resolver) SetDataPath(ctx context.Context, path []string, data interface{}) error
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver implements the resolver.Resolver interface using Wasm modules to perform an evaluation.
func New ¶
New creates a new Resolver instance which is using the Wasm module policy for the given entrypoint ref.
func (*Resolver) Close ¶
func (r *Resolver) Close()
Close shuts down the resolver.
func (*Resolver) Entrypoints ¶
Entrypoints returns a list of entrypoints this resolver is configured to perform evaluations on.
func (*Resolver) Eval ¶
Eval performs an evaluation using the provided input and the Wasm module associated with this Resolver instance.
func (*Resolver) RemoveDataPath ¶
RemoveDataPath will remove any data at the specified path.
func (*Resolver) SetData ¶
SetData will update the external data for the Wasm instance.
func (*Resolver) SetDataPath ¶
SetDataPath will set the provided data on the wasm instance at the specified path.
Source Files ¶
- Version
- v1.4.2 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 hours ago –
Tools for package owners.