Documentation
¶
Index ¶
- type Resolver
- 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 any) error
- func (r *Resolver) SetDataPath(ctx context.Context, path []string, data any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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. This method creates a new background context. If you need to pass an existing context use NewWithContext instead.
func NewWithContext ¶ added in v1.16.0
func NewWithContext(ctx context.Context, entrypoints []ast.Ref, policy []byte, data any) (*Resolver, error)
NewWithContext creates a new Resolver instance which is using the Wasm module policy for the given entrypoint ref. This method accepts a context.
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.